get_index_historical
Daily OHLC price history for a major market index, covering the whole date range you ask for.
Chart-ready: while the range fits in one response, each row is the price feed's
own daily row — {symbol, date, open, high, low, close, volume, change,
changePercent, vwap} — newest first, ordered for direct plotting as an index history.
A range too long to return day by day is aggregated into coarser OHLC bars
rather than cut short. `interval` names which (weekly/monthly/quarterly/yearly),
each bar spans `date` to `endDate`, and a bar's high/low are that period's real
extremes. Aggregated bars carry the same fields except `vwap`, which the feed
defines per session only. Re-request a narrower from_date/to_date for daily rows.
`summary` always describes the FULL requested window, computed from the daily
data: its first and last close with dates, its high and low with dates, and the
trailing changes the window reaches back far enough to support. Base any
"starting level", "a year ago" or "period high/low" claim on `summary`, or on a
bar that is actually present.
`summary.windowHigh`/`windowLow` describe THIS window. A quote tool's
yearHigh/yearLow cover a rolling 52 weeks — a different period — so label those
as 52-week figures. For the current level alone, call get_index_quote.
Args:
symbol: Index symbol (e.g. '^GSPC' for S&P 500)
from_date: Start date YYYY-MM-DD
to_date: End date YYYY-MM-DD (defaults to today)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Index symbol, e.g. '^GSPC' for the S&P 500. | |
| to_date | No | ||
| from_date | Yes |