get_history
Retrieve OHLC price bars for any ticker to analyze historical returns, drawdowns, or run custom event studies.
Instructions
OHLC bars for a single ticker. range='1W'/'1M'/'3M'/'6M'/'1Y'/'2Y'/'5Y'/'ALL' for canned windows, OR pass start_date/end_date (YYYY-MM-DD) for a custom slice.
frequency='daily' (default) | 'weekly' | 'monthly' | 'quarterly' | 'annual' (alias: 'year_end'). For multi-year analysis, USE A COARSER FREQUENCY rather than 50 point queries. A 20-year range='ALL', frequency='annual' request returns ~20 rows; the equivalent in daily granularity is ~5,000 rows that exceed the agent-side response clamp and force you into the dozens-of-calls year-end-extraction pattern that costs credits and time. The downsampler keeps the LAST trading day of each period (week-end / month-end / etc.), which is what return / drawdown / vol calcs actually want.
Use for ad-hoc time-series analysis the trained models don't already cover (return distributions, drawdown curves, custom regression windows, event studies around specific dates).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | No | Canned window: 1W / 1M / 3M / 6M / 1Y / 2Y / 5Y / ALL | 1M |
| ticker | Yes | Single ticker symbol (e.g. 'AAPL') | |
| end_date | No | End date YYYY-MM-DD (overrides range) | |
| frequency | No | Bar granularity: 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'annual'. Default 'daily'. | daily |
| start_date | No | Start date YYYY-MM-DD (overrides range) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |