Assets & Prices
Price History
GET /api/prices/:symbol An asset’s daily price history — open, high, low, close and volume for every day on record — ready to chart. Ask for a date range with from and to, or leave them out for everything.
The full OHLCV (open, high, low, close, volume) is adjusted by default (split- and dividend-adjusted) — see Data Model for the exact adjustment contract and Raw mode below for how to access the unmodified market-printed values.
Example
curl "https://api.bytetree.io/api/prices/AAPL?from=2026-01-02&to=2026-01-05" \
-H "Authorization: Bearer YOUR_API_KEY" const res = await fetch("https://api.bytetree.io/api/prices/AAPL?from=2026-01-02&to=2026-01-05", {
headers: { "Authorization": "Bearer YOUR_API_KEY" },
});
const body = await res.json(); import requests
res = requests.get(
"https://api.bytetree.io/api/prices/AAPL?from=2026-01-02&to=2026-01-05",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
body = res.json() 200 Adjusted values, rounded {
"symbol": "AAPL",
"count": 2,
"data": [
{
"date": "2026-01-02T00:00:00.000Z",
"open": 272.0088,
"high": 277.5837,
"low": 268.7519,
"close": 270.76,
"volume": 37873036.9368
},
{
"date": "2026-01-05T00:00:00.000Z",
"open": 270.3868,
"high": 271.256,
"low": 265.891,
"close": 267.01,
"volume": 45689939.2233
}
]
} Default — adjusted OHLCV
curl https://api.bytetree.io/api/prices/AAPL \
-H "Authorization: Bearer YOUR_API_KEY" Raw OHLCV (forensic; market-printed values)
curl "https://api.bytetree.io/api/prices/AAPL?raw=true" \
-H "Authorization: Bearer YOUR_API_KEY" With date range
curl "https://api.bytetree.io/api/prices/BTCUSD?from=2026-01-01&to=2026-01-31" \
-H "Authorization: Bearer YOUR_API_KEY" 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 — the market-printed values, with no split or dividend adjustment. Default false (adjusted). Only raw=true switches to raw prices; any other value is ignored and you get adjusted prices. See Raw mode. |
Dates must be real calendar dates in YYYY-MM-DD form, or the request is a 400 — see Value validation.
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 (adjusted by default; raw when ?raw=true) |
high |
number | null |
Day high (adjusted by default; raw when ?raw=true) |
low |
number | null |
Day low (adjusted by default; raw when ?raw=true) |
close |
number |
Closing price (adjusted by default; raw when ?raw=true) |
volume |
number | null |
Trading volume (adjusted by default; raw when ?raw=true). For crypto, the US-dollar value traded over the UTC day |
Weekends and market holidays have no row.
Adjusted open, high, low and volume are derived values, so they carry long decimals. With ?raw=true the same first row reads open 272.26, close 271.01, volume 37838100.
Raw mode
?raw=true returns the stored as-printed OHLCV — the values our data providers currently report 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 adjustment math against the source
- Tools that explicitly handle splits and dividend adjustments themselves
Raw values mutate when the provider retroactively rewrites historical bars after a split (this is normal upstream behaviour). The default adjusted OHLCV is seeded from a fully split- and dividend-adjusted history and maintained against our internal splits ledger, and is therefore stable across upstream rewrites — see Data Model for the full contract.
Notes
- The
symbolparameter is case-insensitive (aaplandAAPLboth work) - For crypto, splits and dividends 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 - Currency-pair symbols (
EURUSD) have no OHLCV: the endpoint answers from rate data with close-only rows{ date, close }— the same series as FX Price History