ByteTree API documentation

Universes

A universe is a named list of assets — bytetrend, for example, or bytefolio, the holdings of a ByteTree portfolio. Use one to narrow other requests to its members, or to see group figures for just those assets. This endpoint lists every universe and how many assets each contains.

Membership is explicit and carried on the asset: every asset record lists the universes it belongs to under universes[] (see List Assets), and ?universe=<slug> on the asset and metric endpoints filters to that membership. The group metric routes aggregate a universe’s members across the five global dimensions.

Universes and dimensions are independent: dimensions are defined once, globally, and apply identically to every universe. The whole tracked set — every asset regardless of universe — is aggregated separately as the Macro Dataset. macro is not a universe slug.

Every api+mcp key reaches every universe; there is no per-key universe scope. See Authentication.

“Screens” is a subscription tier, not a universe. On your ByteTrend.io account, Screens names a subscription tier — in-product viewing only, the view capability — and does not by itself grant API or MCP access. Elsewhere in this documentation screen is an unrelated technical term for a ranked selection of assets. The tier that reaches this API and the ByteTree MCP is API + MCP (the api+mcp capability described in Authentication).

The roster

SlugLabelsource
bytetrendByteTrendrule
boldBOLDmanual
whiskyWhiskyportfolio
sodaSodaportfolio
qualityQualityportfolio
global-opportunitiesGlobal Opportunitiesportfolio
bytefolioByteFolioportfolio

The roster is extensible — read it from GET /api/universes rather than hard-coding it. Universe slugs are the values path segments and universe parameters take; an unknown slug returns 404 on a path and 400 on a parameter, each naming the valid slugs.

List Universes

curl https://api.bytetree.io/api/universes

Query Parameters

NameTypeRequiredDescription
limitnumberNoMaximum number of universes to return per page. Default 500, capped at 1000
offsetnumberNoNumber of universes to skip. Default 0

The roster is small enough that the defaults return everything in one call; the parameters exist for envelope consistency with the rest of the API.

Response

This endpoint uses the paginated list envelope:

FieldTypeDescription
countnumberNumber of universes in this page
totalnumberTotal universes, before paging
limitnumberPage size applied
offsetnumberPage offset applied
dataarrayArray of universe objects, in sortOrder

Each universe object:

FieldTypeDescription
universestringUniverse slug (e.g. bytetrend, bytefolio)
labelstringDisplay name (e.g. ByteTrend, ByteFolio)
sourcestringHow membership is determined: rule, portfolio, or manual — see Membership
ruleobject | nullFor source: "rule", the rule that selects members (today { "assetTypes": [...] }); null otherwise
enabledbooleanWhether the universe is live
sortOrdernumberDisplay order
memberCountnumberAssets currently in this universe
{
  "count": 7,
  "total": 7,
  "limit": 500,
  "offset": 0,
  "data": [
    {
      "universe": "bytetrend",
      "label": "ByteTrend",
      "source": "rule",
      "rule": { "assetTypes": ["stock", "etf", "crypto", "commodity"] },
      "enabled": true,
      "sortOrder": 10,
      "memberCount": 316
    },
    {
      "universe": "bold",
      "label": "BOLD",
      "source": "manual",
      "rule": null,
      "enabled": true,
      "sortOrder": 20,
      "memberCount": 0
    },
    {
      "universe": "bytefolio",
      "label": "ByteFolio",
      "source": "portfolio",
      "rule": null,
      "enabled": true,
      "sortOrder": 70,
      "memberCount": 2
    }
  ]
}

Membership

source names how a universe’s membership is determined:

Treat source as a string you switch on, not a closed enum — branch on the values you know and fall through gracefully on anything else. rule is populated only for source: "rule".

A memberCount of 0 is a valid state: a universe is listed as soon as it exists, and its members follow. GET /api/universes/<slug> on an empty universe returns { "universe": "<slug>", "count": 0, "data": {} } — a valid, empty aggregation, not an error.

Errors

StatusWhen
400macro used as a universe slug — the macro dataset is at /api/macro
404Unknown universe slug on a /api/universes/<slug>… path