ByteTrend Monitor
Monitor History
GET /api/monitor/history The day-by-day history behind the ByteTrend Monitor: the average score, the share of members at the top and bottom scores, and the regime counts for one group of one asset type. The group can be the whole bytetrend universe or one of the type’s groupings: for stocks a sector, country or industry, for crypto a cap tier, for commodities a futures group. Use it to chart how a group has moved over time.
Example
curl "https://api.bytetree.io/api/monitor/history?variant=capr200w&dim=sector&group=Technology&from=2026-10-06&to=2026-10-07" \
-H "Authorization: Bearer YOUR_API_KEY" const res = await fetch("https://api.bytetree.io/api/monitor/history?variant=capr200w&dim=sector&group=Technology&from=2026-10-06&to=2026-10-07", {
headers: { "Authorization": "Bearer YOUR_API_KEY" },
});
const body = await res.json(); import requests
res = requests.get(
"https://api.bytetree.io/api/monitor/history?variant=capr200w&dim=sector&group=Technology&from=2026-10-06&to=2026-10-07",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
body = res.json() 200 Numbers rounded {
"count": 2,
"variant": "capr200w",
"dim": "sector",
"group": "Technology",
"data": [
{ "date": "2026-10-06", "n": 451, "bins": [75, 65, 54, 109, 72, 76], "avg": 2.5898, "p5": 0.1685, "p0": 0.1663, "highs": 18, "lows": 9 },
{ "date": "2026-10-07", "n": 451, "bins": [76, 66, 61, 107, 70, 71], "avg": 2.5366, "p5": 0.1574, "p0": 0.1685, "highs": 13, "lows": 12 }
]
} The whole universe, Weekly CAPR, since the start of the year
curl "https://api.bytetree.io/api/monitor/history?variant=capr200w&dim=universe&from=2026-01-01" \
-H "Authorization: Bearer YOUR_API_KEY" Technology stocks, Daily Local, one quarter
curl "https://api.bytetree.io/api/monitor/history?variant=local30d&dim=sector&group=Technology&from=2026-07-01&to=2026-09-30" \
-H "Authorization: Bearer YOUR_API_KEY" One industry as CSV (encode spaces in the group name)
curl "https://api.bytetree.io/api/monitor/history?variant=capr30d&dim=industry&group=Banks+-+Diversified&from=2026-01-01&format=csv" \
-H "Authorization: Bearer YOUR_API_KEY" Large-cap crypto, Daily CAPR
curl "https://api.bytetree.io/api/monitor/history?type=crypto&variant=capr30d&dim=capTier&group=Large&from=2026-01-01" \
-H "Authorization: Bearer YOUR_API_KEY" Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type |
string |
No | The asset type: stock (default), etf, crypto or commodity. See Asset types |
variant |
string |
Yes | Which score: capr200w (Weekly CAPR), capr30d (Daily CAPR), local200w (Weekly Local) or local30d (Daily Local). See Key Concepts |
dim |
string |
Yes | universe, or one of the type’s groupings, which are the key values in the Monitor’s dims: sector, country or industry for stocks, assetClass, exposureRegion or exposureSector for ETFs, capTier for crypto, futuresGroup for commodities. A grouping from another type returns 400 |
group |
string |
Unless dim=universe |
The group’s name, taken from a key in the Monitor’s groups list for that grouping (e.g. Technology, United States, Banks - Diversified, Large). For dim=universe it is optional and defaults to bytetrend |
from |
string |
Yes | Start date YYYY-MM-DD |
to |
string |
No | End date YYYY-MM-DD. Defaults to the latest date |
format |
string |
No | json (default), csv or toon. CSV gives one row per date. See Formats |
What the figures cover
There is one row for each trading day of the type (by close date), covering only the type you asked for. On each date, members with no recent data (for example, ones that had stopped trading) are left out, in the same way as the Monitor’s membership.
type |
Rows start | Daily (30d) figures from |
Weekly (200w) figures from |
Groupings (dim other than universe) |
|---|---|---|---|---|
stock |
2005-11-01 | 2005-11-01 | 2008-05-19 | Full history |
etf |
2005-11-01 | 2005-11-01 | 2008-12-22 | Full history. Each fund is grouped by its current classification on every past date, so a fund whose holdings have changed is counted in its present group throughout |
crypto |
2011-02-02 | 2011-02-02 | 2014-05-23 | Full history. A cap tier’s rows start once it has members |
commodity |
2005-11-01 | 2005-11-01 | 2008-11-14 | Full history |
A Weekly (200w) score needs a 200-week average, so it takes about four years of prices before it exists. Until then, Weekly rows have n: 0, null for avg, p5 and p0, and 0 for highs and lows. Weekly coverage can be thin at first. For stocks it covers only a handful of members until late 2008, so use stock Weekly history from 2009 onward. A new row is added for every type after each daily run.
These figures will not match the Macro Dataset or the universe group routes for the same group. Those include every asset type in the group, while Monitor History counts one type at a time.
Response
| Field | Type | Description |
|---|---|---|
count |
number |
Number of dates returned |
variant |
string |
The variant you asked for |
dim |
string |
The dim you asked for |
group |
string |
The group, bytetrend for dim=universe |
data |
object[] |
One row per date, oldest first |
data[].date |
string or null |
Close date YYYY-MM-DD (null only if the stored row is damaged) |
data[].n |
number |
Members with a score on that date |
data[].bins |
number[6] or null |
How many members sit at each score: bins[0] counts score 0, up to bins[5] for score 5. The six add up to n. null on a row stored without the tally |
data[].avg |
number or null |
Average score |
data[].p5 |
number or null |
Fraction at score 5, from 0 to 1 (0.15 means 15%) |
data[].p0 |
number or null |
Fraction at score 0, from 0 to 1 |
data[].highs |
number or null |
Members in the Leading Trend or Emerging Trend regime |
data[].lows |
number or null |
Members in the Weakening Trend or Bear Trend regime |
A known group with no data in the date range you asked for returns 200 with count: 0 and an empty data array. Responses are sent with Cache-Control: private, max-age=3600.
Errors
| Status | When |
|---|---|
400 |
A required parameter is missing or invalid (including an unknown type, or a dim the type does not have; the message lists the accepted values), a date is impossible (2026-02-30), from is after to, or the range is too broad to finish in time. If that happens, narrow from / to |
401 |
Missing or invalid API key |
403 |
Key lacks the api+mcp capability |
404 |
The group is not known for that dim and type, for example { "error": "unknown group 'Nope' for dim=sector, type=stock" }. A type with no history yet answers the same way. (The Group History routes answer an unknown group with an empty 200 instead.) |