get_historic_bars
Retrieve historical OHLCV bar data for any symbol across equities, options, crypto, and indices over customizable time periods, with optional aggregation.
Instructions
Get OHLCV historic bar data for a symbol over a given time period.
Returns pre-market, regular-market, and after-hours bars plus the last regular trading session close.
Args: symbol: Ticker symbol. Format depends on instrument_type: - EQUITY: e.g. "AAPL" - CRYPTO: e.g. "BTC" (do not append "-USD") - OPTION: OSI-normalized symbol, e.g. "AAPL260320C00280000" - INDEX: e.g. "SPX" period: Time window. One of DAY, WEEK, MONTH, QUARTER, HALF_YEAR, YEAR, FIVE_YEARS, YTD, SINCE_PURCHASE. instrument_type: EQUITY, CRYPTO, OPTION, or INDEX. Default EQUITY. aggregation: Optional bar size. One of ONE_MINUTE, FIVE_MINUTES, TEN_MINUTES, FIFTEEN_MINUTES, THIRTY_MINUTES, ONE_HOUR, ONE_DAY, ONE_WEEK, ONE_MONTH, THREE_MONTHS, SIX_MONTHS, ONE_YEAR. If omitted, the server picks an appropriate size for the period. purchase_date: Required when period is SINCE_PURCHASE. Format: YYYY-MM-DD.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| period | Yes | ||
| instrument_type | No | EQUITY | |
| aggregation | No | ||
| purchase_date | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |