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