Discovery
Universes
GET /api/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
viewcapability — 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 Analyst (API + MCP) (theapi+mcpcapability described in Authentication).
The roster
bytetrend is the permanent universe: every tracked asset of the types in its rule (stocks, ETFs, crypto and commodities today). The others are portfolio-led or curated baskets — bytefolio, for example — and the set changes over time as ByteTree adds, enables or retires them.
So don’t hard-code the list: read the live roster from GET /api/universes, which returns each universe’s slug, label, source (how its membership is decided) and memberCount.
GET /api/universes lists a universe as soon as it is enabled, even before it has members — expect memberCount: 0 on a basket that is still being filled. ByteTree MCP’s list_grouping_configs serves the same roster but only its populated universes, so a basket can appear in the API before it appears in the MCP.
Universe slugs are the values path segments and universe parameters take; an unknown slug returns 404 on a path and 400 on a parameter; the 400 names the valid slugs, the 404 does not — read them from GET /api/universes.
List Universes
Example
curl https://api.bytetree.io/api/universes \
-H "Authorization: Bearer YOUR_API_KEY" const res = await fetch("https://api.bytetree.io/api/universes", {
headers: { "Authorization": "Bearer YOUR_API_KEY" },
});
const body = await res.json(); import requests
res = requests.get(
"https://api.bytetree.io/api/universes",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
body = res.json() 200 Three of seven entries; the live roster changes {
"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": 5569
},
{
"universe": "bold",
"label": "BOLD",
"source": "manual",
"rule": null,
"enabled": true,
"sortOrder": 20,
"memberCount": 0
},
"..."
]
} Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit |
number |
No | Maximum number of universes to return per page. Default 500, capped at 1000 |
offset |
number |
No | Number of universes to skip. Default 0 |
includeDisabled |
boolean |
No | Accepted for compatibility and has no effect for API keys, which always see the full roster. It must still be true or false; anything else returns 400 |
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:
| Field | Type | Description |
|---|---|---|
count |
number |
Number of universes in this page |
total |
number |
Total universes, before paging |
limit |
number |
Page size applied |
offset |
number |
Page offset applied |
data |
array |
Array of universe objects, in sortOrder |
Each universe object:
| Field | Type | Description |
|---|---|---|
universe |
string |
Universe slug (e.g. bytetrend, bytefolio) |
label |
string |
Display name (e.g. ByteTrend, ByteFolio) |
source |
string |
How membership is determined: rule, portfolio, or manual — see Membership |
rule |
object | null |
For source: "rule", the rule that selects members (today { "assetTypes": [...] }); null otherwise |
enabled |
boolean |
Whether the universe is live |
sortOrder |
number |
Display order |
memberCount |
number |
Active assets currently in this universe — the total of /api/assets?universe=<slug>&status=active |
Membership
source names how a universe’s membership is determined:
rule— members are selected by a rule over asset attributes, recomputed as the registry changes.bytetrendis every tracked asset of the types in itsrule.assetTypes.portfolio— members are the holdings of a ByteTree portfolio. Assets join and leave as the portfolio changes.manual— a curated list.
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 is enabled, and its members follow (see The roster). GET /api/universes/<slug> on an empty universe returns { "universe": "<slug>", "count": 0, "data": {}, "smallOmitted": 0 } — a valid, empty aggregation, not an error. A small universe with members can also come back nearly empty, because group listings omit groups under five assets by default — see Small-group floor.
Errors
| Status | When |
|---|---|
400 |
macro used as a universe slug — the macro dataset is at /api/macro |
404 |
Unknown universe slug on a /api/universes/<slug>… path |
410 |
A retired path, such as /api/universes/configs. The body points to its replacement: { "error": "the per-universe grouping configs retired; the global dimensions are at /api/dimensions" } |