Financial Datasets Get Historical Stock Prices API
Returns historical price bars for one stock ticker as a list of open, high, low, close and volume values. It needs a ticker, and you can set interval, interval_multiplier, start_date and end_date to choose the range and bar size.
Use cases
- Plot a daily candlestick chart for
AAPL over a chosen date range.
- Compute daily returns or moving averages from the
close values.
- Backtest a trading rule against historical open, high, low and close data.
- Check trading volume on specific days to spot unusual activity.
Request
curl -X POST "https://api.sandbase.ai/v1/api/financial-datasets/prices" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ticker": "AAPL", "interval": "day", "interval_multiplier": "1", "start_date": "2026-10-01", "end_date": "2026-10-10"}'
The result is returned in outputs[0].data.
Parameters
Example response
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"prices": [
{
"close": 330.32,
"high": 332.48,
"low": 325.81,
"open": 330.0,
"ticker": "AAPL",
"time": "2026-10-01",
"volume": 36306346
}
],
"ticker": "AAPL"
}
Response fields
Notes
- Use
YYYY-MM-DD for start_date and end_date. The interval parameter accepts day, week, month or year.
- Weekend dates are absent from the daily response. The sample jumps from
2026-10-02 to 2026-10-05.
- To page through a long result, pass the cursor from
next_page_url as cursor. When you send cursor, all other parameters are ignored.
- For the latest price only, call Financial Datasets Get Stock Price Snapshot.
Pricing
$0.02 per successful call. Failed calls are not charged.