Get Stock Bars
get_stock_barsRetrieve historical OHLCV price bars for any stock or stock list, with selectable timeframe, date range, and price adjustments for analysis and backtesting.
Instructions
Retrieve historical price bars (OHLCV) for one or more stocks.
When start is omitted, it is automatically computed as now minus the days/hours/minutes lookback.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Inclusive end time (RFC 3339). Omit for current time. | |
| asof | No | As-of date (YYYY-MM-DD) for point-in-time symbol mapping. Useful for backtesting with historical ticker changes. | |
| days | No | Days to look back when start is omitted (default 5). | |
| feed | No | Data feed — "sip" (all US exchanges, default, paid), "iex" (IEX only, free tier), "otc", or "boats". | |
| sort | No | Timestamp sort order — "asc" (default) or "desc". | asc |
| hours | No | Additional hours in the lookback (default 0). | |
| limit | No | Max total data points returned across all symbols, 1–10000 (default 1000). | |
| start | No | Inclusive start time (RFC 3339). Omit to use relative lookback. | |
| minutes | No | Additional minutes in the lookback (default 0). | |
| symbols | Yes | Comma-separated tickers (e.g. "AAPL" or "AAPL,MSFT,GOOG"). | |
| currency | No | Price currency (ISO 4217, e.g. "USD"). Default USD. | |
| timeframe | No | Bar aggregation period — "1Min", "5Min", "15Min", "30Min", "1Hour", "1Day", "1Week", or "1Month". | 1Day |
| adjustment | No | Price adjustment — "raw", "split", "dividend", "spin-off", or "all". Comma-separated combos allowed (e.g. "split,dividend"). Default "raw". | raw |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||