ByteTree API documentation

Universe Groups

The same group figures as the Macro Dataset, counting only one universe’s members — for example, the average trend score by sector within bytetrend. This route returns every group in all five dimensions (Region, Sector, Industry, Type, Country) at once.

Dimensions are global, so every universe is grouped the same way.

Request

# All dimensions for the ByteTrend universe
curl https://api.bytetree.io/api/universes/bytetrend

# All dimensions for ByteFolio
curl https://api.bytetree.io/api/universes/bytefolio

# Time series
curl "https://api.bytetree.io/api/universes/bytetrend?from=2026-01-01&to=2026-03-01"

Path Parameters

NameTypeRequiredDescription
universestringYesUniverse slug (e.g. bytetrend, bytefolio) — see Universes for the roster. Unknown slugs return 404; macro returns 400 (the macro dataset is at /api/macro).

Query Parameters

NameTypeRequiredDescription
fromstringNoStart date YYYY-MM-DD. Returns time series when provided.
tostringNoEnd date YYYY-MM-DD
fieldsstringNoComma-separated metric fields to include

Response

FieldTypeDescription
universestringUniverse key
countnumberTotal number of group records across all dimensions
dataobjectGroups organised by category: { region: [...], sector: [...], industry: [...], type: [...], country: [...] }

Each group metric object contains:

Identification

FieldTypeDescription
dimensionstringUniverse/category slug (e.g. bytetrend/region, bytefolio/sector)
groupstringGroup label (e.g. Europe, Americas, Technology)
datestringAggregation date
assetCountnumberNumber of assets in this group

ByteTrend Score Aggregates

Each of the four ByteTrend scores (see Latest Metrics) has a matching set of group-level aggregates. Window suffixes map to UI labels: 200w = Weekly, 30d = Daily.

FieldTypeDescription
avgByteTrendLocal200w / avgByteTrendLocal30dnumber | nullMean Local (Weekly / Daily) score across the group
avgByteTrendCapr200w / avgByteTrendCapr30dnumber | nullMean CAPR (Weekly / Daily) score
medianByteTrendLocal200w / medianByteTrendLocal30dnumber | nullMedian Local (Weekly / Daily) score
medianByteTrendCapr200w / medianByteTrendCapr30dnumber | nullMedian CAPR (Weekly / Daily) score
pctScore5Local200w / pctScore0Local200wnumber | nullFraction of assets at Weekly Local score 5 / 0
pctScore5Local30d / pctScore0Local30dnumber | nullFraction at Daily Local score 5 / 0
pctScore5Capr200w / pctScore0Capr200wnumber | nullFraction at Weekly CAPR score 5 / 0
pctScore5Capr30d / pctScore0Capr30dnumber | nullFraction at Daily CAPR score 5 / 0

ByteTrend Score Bins

Per-variant histograms of the assets in the group, bucketed by their ByteTrend score (0–5) — the shape of the distribution rather than its average, which a mean alone hides. Each variant’s array is the bin count vector; bins[0] counts assets at score 0, bins[5] counts assets at score 5.

FieldTypeDescription
byteTrendBinsobject | undefinedPer-variant score histograms. See shape below. Omitted on rows aggregated before 2026-05-02 — see the Changelog.

The byteTrendBins object:

KeyTypeDescription
local200wnumber[6]Score histogram for Weekly Local — bins[i] = count of assets at Local Weekly score i
local30dnumber[6]Score histogram for Daily Local
capr200wnumber[6]Score histogram for Weekly CAPR
capr30dnumber[6]Score histogram for Daily CAPR

For each variant, sum(bins) ≤ assetCount — the sum equals assetCount minus the number of group members whose score for that variant is null (e.g. asset hasn’t accumulated enough history for the long window).

"byteTrendBins": {
  "local200w": [4, 7, 27, 3, 17, 47],
  "local30d":  [11, 15, 16, 17, 10, 37],
  "capr200w":  [23, 16, 15, 16, 13, 22],
  "capr30d":   [40, 10, 18, 11, 4, 23]
}

(Sample: /api/macro/region/North America, assetCount = 106 — sums of 105 / 106 / 105 / 106 reflect 1, 0, 1, 0 null-score members respectively.)

Trend Distribution

FieldTypeDescription
trendDistributionobjectCount of assets per Weekly CAPR trend regime (e.g. { "Leading Trend": 3, "Neutral": 95, ... })
dominantTrendstring | nullMost common trend regime

Returns

FieldTypeDescription
avgReturnUsd1WavgReturnUsd12Mnumber | nullEqual-weighted average USD returns
capWtReturnUsd1WcapWtReturnUsd12Mnumber | nullMarket-cap-weighted USD returns

Risk

FieldTypeDescription
avgVolatility30wnumber | nullAverage 30-week volatility
avgSharpe52wnumber | nullAverage 52-week Sharpe ratio
totalMarketCapUsdnumber | nullSum of market caps in USD
avgDrawdown52wnumber | nullAverage 52-week drawdown
avgRelStrengthCapped3M / avgRelStrengthCapped12Mnumber | nullAverage capped relative strength
{
  "universe": "bytetrend",
  "count": 132,
  "data": {
    "region": [
      {
        "dimension": "bytetrend/region",
        "group": "Americas",
        "date": "2026-09-09T00:00:00.000Z",
        "assetCount": 80,
        "avgByteTrendLocal200w": 3.2,
        "avgByteTrendLocal30d": 2.9,
        "avgByteTrendCapr200w": 2.8,
        "avgByteTrendCapr30d": 2.4,
        "medianByteTrendLocal200w": 4,
        "pctScore5Local200w": 0.4,
        "pctScore0Local200w": 0.05,
        "totalMarketCapUsd": 45000000000000,
        "dominantTrend": "Neutral",
        "byteTrendBins": {
          "local200w": [4, 7, 27, 3, 17, 47],
          "local30d":  [11, 15, 16, 17, 10, 37],
          "capr200w":  [23, 16, 15, 16, 13, 22],
          "capr30d":   [40, 10, 18, 11, 4, 23]
        },
        "..." : "..."
      }
    ],
    "sector": [
      { "dimension": "bytetrend/sector", "group": "Technology", "assetCount": 41, "..." : "..." }
    ],
    "industry": [ "..." ],
    "type": [ "..." ]
  }
}

Errors

StatusWhen
400macro in the universe position — the macro dataset is served at /api/macro
404Unknown universe slug

An empty universe is not an error: GET /api/universes/<slug> on a universe with no members returns { "universe": "<slug>", "count": 0, "data": {} }. The same statuses apply on Dimension Groups and Group History.