Getting started
Data Model
Prices come in two versions. Adjusted prices — the default everywhere — are corrected for stock splits and dividends, so a chart stays continuous. Raw prices are the values exactly as printed on the day. This page explains the difference, what the adjustment includes, and which to use.
Bottom line. Default-trust the adjusted values for any chart, dashboard, or computed metric. Raw is for forensic or audit users who need to reconstruct the historical market-printed price.
Data sources
Crypto prices come from the CoinDesk CADLI index: one price per asset, aggregated across about 300 exchanges and volume-weighted over the 24 hours to 00:00 UTC, which is the day’s close. Open, high, low and close are index values, and volume is the US-dollar value traded across the index’s constituent exchanges over the UTC day. A crypto day’s price is final at its close and changes later only if the index publisher corrects it. For now, a few crypto assets the index doesn’t cover are priced by our market-data providers instead.
Stocks, ETFs, indices, commodities and exchange rates come from our market-data providers. The rest of this page — splits, dividends and the raw view — applies to them; crypto has no splits or dividends, so its adjusted and raw prices are identical.
Three layers
1. Forensic archive (not exposed)
What the upstream data providers returned at original ingest. Append-only and immutable. Not exposed via the public API. Used internally to reconstruct exactly what we received and when.
2. Raw prices
The daily-fetch landing pad for the provider’s current view of historical OHLCV. Mutable: the provider retroactively rewrites the raw close (and the legacy adjClose) for split-affected symbols whenever a split is processed, so a raw historical close for a stock can change after the fact.
Exposed publicly through:
GET /api/prices/:symbol?raw=true— full raw OHLCV- The
*Rawfields on metric responses:closeRawUsd,caprRaw,marketCapRawUsd
3. Adjusted prices (the default)
Seeded from a fully split- and dividend-adjusted price history, then maintained forward against our internal splits ledger via a pure function. Idempotent — the same inputs always produce the same outputs — and immune to upstream rewrites since the 2026-05-05 cutover.
This is the default for any chart, score, moving average, drawdown, or return computation. Exposed publicly through:
GET /api/prices/:symbol— default OHLCV is adjustedGET /api/prices— the latest day only, served as stored; it normally matches the latest bar of the adjusted seriesGET /api/metrics/*—closeUsd,capr,marketCapUsdare adjusted; every time-series metric is computed on adjusted close
What the adjustment contains
- Splits — fully adjusted, past and future. New splits rebase the series via the internal splits ledger as they occur.
- Dividends — fully adjusted as of the series’ seed point. Distributions after the seed are not retro-applied; they flow through as ordinary price movement, exactly as on an exchange print. ByteTree checks the series against an independently adjusted one for material drift.
In practice: long-history values for dividend-paying assets sit below the market-printed price of the day (cumulative distributions are folded back into history), while the most recent bars match the print. If you reconcile against a split-only-adjusted vendor series, expect historical values on dividend payers to differ by roughly the compounded yield.
Which view do you want?
| Use case | Surface |
|---|---|
| Charts, dashboards, sparklines | Default (adjusted) |
| Score computation, MAs, drawdowns, returns | Default (adjusted) — internal pipelines already use these |
| Reconstructing the historical market-printed price | Raw — ?raw=true on /api/prices/:symbol, or the *Raw metric fields |
| Forensic / audit | Raw |
Why two close fields exist
Internal compute pipelines (ByteTrend scores, drawdowns, MAs, returns, deviations) operate on adjusted close so historical signal isn’t corrupted by split discontinuities or dividend-distribution steps. Quoted-state fields (closeUsd, market cap) used to live on raw close — that meant a stock’s reported “today’s close” disagreed with the close used to compute its MA. The 2026-05-05 cutover unified both onto the adjusted basis by default; the raw view is preserved alongside as *Raw fields and ?raw=true for the small audience that needs it.
FX
FX pairs aren’t subject to splits or dividends, so the adjusted and raw views are identical. The /api/fx/* namespace and the polymorphic FX rows on /api/assets and /api/metrics therefore expose only the default (adjusted-equivalent) values.
Related
GET /api/prices/:symbol—?raw=truereference- Latest Metrics — Valuation —
closeUsd/capr/marketCapUsdand their*Rawcounterparts