Historical stock price API (30 years)
Historical stock data API: daily prices up to 30 years, plus volume, RSI, financial ratios, and dividends as compact columnar series.
Authorizations
StockContext API key. Keys start with sctx_ and are sent on every REST request.
Query Parameters
Ticker symbol. Case-insensitive; share-class dots are normalized to dashes (BRK.B == BRK-B). Returns SYMBOL_UNKNOWN when the symbol is outside the supported universe.
"AAPL"
Comma-separated list of history series. Allowed values: close, volume, rsi_14, pe_ttm, ps_ttm, ev_ebitda_ttm, roic_pct, fcf_margin_pct, gross_margin_pct, dividend. daily/weekly support close, volume, rsi_14, pe_ttm, ps_ttm, ev_ebitda_ttm; quarterly/annual support roic_pct, fcf_margin_pct, gross_margin_pct; per-payment supports dividend. The valuation series (pe_ttm, ps_ttm, ev_ebitda_ttm) are derived from SEC EDGAR filings with point-in-time TTM windows joined on each filing's date.
"close,volume"
Historical lookback window. Allowed values: 1m, 1mo, 3m, 3mo, 6m, 6mo, 1y, 2y, 5y, 10y, 30y, ytd, max. Long mo forms normalize to short month forms; max is capped at 30y.
1m, 1mo, 3m, 3mo, 6m, 6mo, 1y, 2y, 5y, 10y, 30y, ytd, max "1y"
Legacy alias for range (back-compat).
1m, 1mo, 3m, 3mo, 6m, 6mo, 1y, 2y, 5y, 10y, 30y, ytd, max "1m"
Row cadence. Allowed values: daily, weekly, quarterly, annual, per-payment.
daily, weekly, quarterly, annual, per-payment "daily"
Response format: 'rows' (default) or 'compact'.
"compact"