get_commodity_historical
Daily OHLC price history for a commodity, 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 a price 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 price", "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_commodity_quote.
Args:
symbol: Commodity symbol (e.g. 'GCUSD' for gold)
from_date: Start date YYYY-MM-DD (optional)
to_date: End date YYYY-MM-DD (optional)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Commodity symbol, e.g. 'GCUSD' (gold). | |
| to_date | No | ||
| from_date | No |