Alpaca Bars
alpaca_barsHistorical US stock OHLCV bars with per-bar VWAP and trade count. Timeframes 1Min/5Min/15Min/1Hour/1Day; intraday bars include pre-market and after-hours sessions on the IEX feed. Each bar: {t, o, h, l, c, v, vwap, trades}. Use start/end ISO timestamps or a lookback shorthand like "2h", "5d". Multiple symbols comma-separated (max 20). BYOK Alpaca (free account). Example: alpaca_bars({ symbols: "AAPL", timeframe: "5Min", lookback: "1d", _apiKey: "key_id:secret_key" })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | End time, ISO/RFC-3339 or date (default: now) | |
| limit | No | Max bars per symbol to return, 1-1000 (default 100) | |
| start | No | Start time, ISO/RFC-3339 (e.g. "2026-07-18T09:30:00-04:00") or date "2026-07-18" | |
| _apiKey | Yes | REQUIRED: your Alpaca credentials as "key_id:secret_key" — both halves joined by a colon. Free at alpaca.markets (a paper-trading account is enough for market data). | |
| symbols | Yes | Comma-separated ticker symbols, e.g. "AAPL,MSFT" (max 20) | |
| lookback | No | Shorthand window ending now, instead of start/end: e.g. "30m", "2h", "1d", "5d", "2w" | |
| timeframe | No | Bar size: "1Min", "5Min", "15Min", "1Hour", or "1Day" (default "5Min") |