Spark API: close-price series
Close-only price series for up to 50 symbols in one call, the compact shape for sparklines, watchlists and tiles.
GET/v8/finance/spark
Request
curl -H "x-api-key: $KEY" \
"https://api.stockdataapi.com/v8/finance/spark?symbols=SPY,QQQ&range=1mo&interval=1d"Send your key in the x-api-key header. Try it in the browser with your own key.
Parameters
symbolsquerystringrequired
Comma-separated symbols, up to your plan's symbols-per-request (50 at most).
intervalquerystring
Bar size:
1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo or 3mo. 60m and 1h are the same bars.Default:
1drangequerystring
1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max, or any N followed by d, wk, mo or y. Nd counts trading sessions; mo, y and ytd are calendar arithmetic in the exchange's timezone.Default:
1moBehavior
- The response is a plain object keyed by symbol, each with
timestamp[]andclose[], with no envelope. Symbols with no data are omitted rather than nulled. - Unlike the quote endpoint, a malformed symbol refuses the whole request with a 400 naming it.
- Intervals, ranges, sessions and
chartPreviousClosefollow the chart endpoint; there is noperiod1/period2here. - 50,000 bars in total across the request; more is a 400 naming the levers (a shorter range, a coarser interval, fewer symbols), never a shortened series.
Example response
{
"SPY": {
"symbol": "SPY",
"timestamp": [1785945600, 1786032000, 1786118400],
"close": [528.4, 531.1, 530.2],
"chartPreviousClose": 526.9,
"previousClose": 530.9,
"dataGranularity": "1d",
"start": 1785945600,
"end": 1786118400
},
"QQQ": {
"symbol": "QQQ",
"timestamp": [1785945600, 1786032000, 1786118400],
"close": [462.7, 464.9, 463.8],
"chartPreviousClose": 461.5,
"previousClose": 464.2,
"dataGranularity": "1d",
"start": 1785945600,
"end": 1786118400
}
}jsonRelated endpoints
- Chart API: OHLCV historyOHLCV history — daily back to 1970, plus intraday
- Quote APILatest quote snapshots, batched up to 50 symbols
Every plan includes this endpoint.
Create your free key