ByteTree API documentation

Key Concepts

Everything in the ByteTree API builds on a handful of ideas. This page explains each one in plain terms. Every section ends with a link to the detailed reference, for when you want to go deeper.

Assets and symbols

An asset is anything ByteTree tracks: a stock, an ETF, a cryptocurrency, a commodity or a market index. Each asset has a symbolAAPL for Apple, BTCUSD for Bitcoin — and you use that symbol whenever you ask about it. Currency pairs such as EURUSD (euros priced in US dollars) are tracked too.

Go deeper: List Assets · Get Asset

Prices

ByteTree records a price for every asset once a day: the open, high, low and close, plus how much traded (volume). Stocks have a price for each trading day; crypto trades every day of the week, so it has one for every calendar day.

Prices are adjusted for stock splits and dividends by default. That keeps a price chart smooth — it doesn’t suddenly halve when a company splits its shares. If you need the price exactly as it was printed on the day, you can ask for the raw price instead.

Go deeper: Price History · Data Model

The ByteTrend score

ByteTrend is ByteTree’s measure of how strong an asset’s trend is. It is a whole number from 0 to 5, built by asking five yes-or-no questions about the asset’s recent price and counting the yeses:

  1. Is the price above its long-term average?
  2. Is the price above its short-term average?
  3. Is the long-term average rising?
  4. Is the short-term average rising?
  5. Was the most recent extreme a high rather than a low?
ScoreWhat it means
5Every sign points up — a strong uptrend
1–4Mixed signals — the higher the number, the healthier the trend
0Every sign points down — a strong downtrend

Weekly and Daily

Every score comes in two timescales:

Both are recalculated every day — “Weekly” and “Daily” describe how far back each one looks, not how often it updates.

Local and CAPR

Every score is also worked out two ways:

Comparing the two tells you something useful: an asset with a Local score of 5 and a CAPR score of 2 on the same timescale is rising, but more slowly than the market as a whole.

Four scores per asset

Two timescales times two ways of measuring gives four scores for every asset, every day:

Local (own price)CAPR (against the market)
WeeklybyteTrendLocal200wbyteTrendCapr200w
DailybyteTrendLocal30dbyteTrendCapr30d

Where the API shows a single headline score — on List Assets, for example — it is Weekly CAPR, byteTrendCapr200w.

Go deeper: Latest Metrics — ByteTrend scores · the full scoring rules

Trend regimes

A trend regime is a short label for where an asset’s trend stands. It combines the ByteTrend score with one extra question: is the price (or, for CAPR, the asset’s performance against the market) at its highest or lowest point recently? “Recently” follows the score’s timescale — the last 30 weeks for a Weekly score, the last 30 trading days (about six weeks) for a Daily one.

RegimeWhen it applies
Leading TrendScore of 5, at a recent high
Emerging TrendScore of 1–4, at a recent high
Weakening TrendScore of 1 or more, at a recent low
Bear TrendScore of 0, at a recent low
NeutralAnything else — most assets, most days

Because the named regimes need both conditions at once, an asset can score 5 and still be Neutral if its price has slipped just below its recent high.

For Weekly CAPR, a new label has to hold for five days in a row before it counts as confirmed. That filters out one-day flickers, so the confirmed label is the one to use when you look back over history.

Go deeper: Latest Metrics — Trend Regime · Regime Transitions

Universes

A universe is a named list of assets. bytetrend, for example, contains every stock, ETF, cryptocurrency and commodity ByteTree tracks, and bytefolio contains the holdings of a ByteTree portfolio. Add a universe to an asset search to list just its members:

/api/assets?universe=bytetrend

Go deeper: Universes — the full list, and how each one’s membership is decided

Dimensions and groups

Every asset is classified five ways: by region, country, sector, industry and asset type. These five are the dimensions. Each value within a dimension — Europe, Technology, Banking & Lending — is a group.

ByteTree publishes daily figures for every group: average trend scores, how many assets are in each regime, returns and risk. That lets you compare, say, the average trend of European stocks with North American ones.

Go deeper: Dimensions

Reading field names

Field names are compact but regular. byteTrendCapr200w reads as ByteTrend score · CAPR · Weekly, and returnUsd12M as return in US dollars over 12 months. A trailing number and letter give the time window:

SuffixMeansExample
ddays30d — the Daily score’s window
wweeks200w — the Weekly score’s window
MmonthsreturnUsd1M — one-month return

closeRawUsd, caprRaw and marketCapRawUsd hold the unadjusted, as-printed versions of the price, CAPR and market value — see Data Model.

How often data updates

Once a day. Stocks and indices update on trading days; crypto updates every day; exchange rates update on weekdays. Scores and metrics are recalculated after each day’s prices arrive.

Next: Getting Started walks you through your first request.