get_price_history
Retrieve historical open, high, low, close, and volume bars for a stock, crypto, option, or index over a specified time period. Analyze price trends and session-specific data including pre-market and after-hours sessions.
Instructions
Get historical OHLCV price bars for a symbol over a time period.
Returns open/high/low/close/volume bars split into pre-market, regular, and after-hours sessions, plus previous close and total gain/loss. Use this for trend analysis and historical prices — get_quotes returns the current price only, and get_history is account activity, not prices.
Args: symbol: Ticker symbol (e.g. "AAPL"). period: Time window to retrieve (e.g. "YEAR", "TEN_YEARS", "ALL"). instrument_type: EQUITY, CRYPTO, OPTION, or INDEX. Default EQUITY. aggregation: Optional bar size. Prefer omitting it — the server then picks an appropriate size for the period. Only a subset of sizes is valid per period (finer/coarser sizes are rejected); if you set an invalid one, the error lists the valid options. purchase_date: Required only when period is "SINCE_PURCHASE". Format "YYYY-MM-DD". trading_session_toggle: Which sessions to include on the DAY equity chart. Omit for the default (REGULAR_AND_EXTENDED_HOURS, 04:00–20:00 ET). REGULAR_HOURS limits to 09:30–16:00. ALL_SESSIONS returns a full midnight-to-midnight chart including the overnight ATS sessions, adding preMarketOvernight (00:00–04:00) and postMarketOvernight (20:00–24:00) to the response.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | Yes | ||
| symbol | Yes | ||
| aggregation | No | ||
| purchase_date | No | ||
| instrument_type | No | EQUITY | |
| trading_session_toggle | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |