GET /api/prices/:symbol Price Time Series
Returns daily OHLCV data for a specific symbol. The full OHLCV (open, high, low, close, volume) is split-adjusted by default — see Data Model for the rationale and Raw mode below for how to access the unmodified market-printed values.
Request
# Default — split-adjusted OHLCV
curl https://api.bytetree.io/api/prices/AAPL
# Raw OHLCV (forensic; preserves split discontinuities)
curl "https://api.bytetree.io/api/prices/AAPL?raw=true"
# With date range
curl "https://api.bytetree.io/api/prices/BTCUSD?from=2026-01-01&to=2026-01-31"
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Ticker symbol (e.g. AAPL, BTCUSD). Case-insensitive. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
from | string | No | Start date in YYYY-MM-DD format. Inclusive. |
to | string | No | End date in YYYY-MM-DD format. Inclusive. |
raw | boolean | No | When true, returns the unmodified raw OHLCV as currently reported upstream — preserving split discontinuities. Default false (split-adjusted). See Raw mode. |
Response
| Field | Type | Description |
|---|---|---|
symbol | string | The normalised (uppercase) symbol |
count | number | Number of data points returned |
data | array | Array of daily OHLCV objects |
Each data point:
| Field | Type | Description |
|---|---|---|
date | string | ISO 8601 date |
open | number | null | Opening price (split-adjusted by default; raw when ?raw=true) |
high | number | null | Day high (split-adjusted by default; raw when ?raw=true) |
low | number | null | Day low (split-adjusted by default; raw when ?raw=true) |
close | number | Closing price (split-adjusted by default; raw when ?raw=true) |
volume | number | null | Trading volume (split-adjusted by default; raw when ?raw=true) |
{
"symbol": "AAPL",
"count": 2,
"data": [
{
"date": "2026-01-02T00:00:00.000Z",
"open": 220.10,
"high": 223.50,
"low": 219.80,
"close": 222.40,
"volume": 48123000
},
{
"date": "2026-01-03T00:00:00.000Z",
"open": 222.40,
"high": 225.10,
"low": 221.90,
"close": 224.75,
"volume": 51204000
}
]
}
Raw mode
?raw=true returns the raw OHLCV from PriceData — the values our data provider currently reports for each historical bar. This is forensic mode and serves a narrow audience:
- Reconstructing what the market actually printed on a given historical date
- Auditing the split-adjustment math against the source
- Tools that explicitly handle split discontinuities themselves
Raw values mutate when the provider retroactively rewrites historical bars after a split (this is normal upstream behaviour). The default split-adjusted OHLCV is computed from RawPriceData + our internal splits ledger and is therefore stable across upstream rewrites — see Data Model for the full rationale.
Notes
- The
symbolparameter is case-insensitive (aaplandAAPLboth work) - For crypto, splits don’t apply, so adjusted and raw OHLCV are identical
- Without
from/to, returns all available history for the symbol - Data is sorted chronologically (oldest first)
- Returns an empty
dataarray if no records match