Data Model
The ByteTree API exposes both adjusted and raw price values. This page explains the three internal layers that produce them — and exactly what the adjustment contains — so consumers can decide which surface to read.
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.
Three layers
1. RawPriceData — forensic archive
What the upstream data provider 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. PriceData raw fields — daily landing pad
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. Own-computed adjusted OHLCV — default display
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— defaultcloseis adjustedGET /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. A parity audit against the upstream fully-adjusted series watches 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