TAO staked, unstaked and moved between subnets, per subnet and closed UTC day
https://api.bittensor.ai/api/v2/subnets/stake-flows/daily- Status
- Beta
- Auth
- API key or OAuth access token
- Scope
data:read- Rate limit
plan
Per subnet and closed UTC day, oldest first, from the chain's events.
Full description
Per subnet and closed UTC day, oldest first, from the chain's events: TAO staked and unstaked directly (StakeAdded / StakeRemoved less the legs every move emits) and the TAO value moved in from and out to other subnets (StakeMoved / StakeSwapped / StakeTransferred / StakeAndHotkeyTransferred), with each count, net_move_tao_rao (in - out) and net_flow_tao_rao (stake - unstake + in - out). Moves inside one subnet (a hotkey or owner change) are apart (intra_subnet_*): no net flow. A subnet-day without any flow has no entry. Over every subnet (no netuids) a day's moves in equal its moves out, in count and TAO (checked). Covered from 2026-09-27 (meta.from_day). Moves when the next day is available: cached as slow. Day window: from_day / to_day (inclusive UTC days), or days back from to_day (not both days and from_day); no ceiling: a range longer than meta.page.limit_days pages by cursor (meta.page.next_cursor), oldest days first, and meta.range states the whole request (from_day raised to the first available day says so). An explicit to_day is never answered with an earlier day: one not available yet is a 503 NOT_READY. While paged day windows are not available yet, from_day, to_day and cursor are a 503 SOURCE_NOT_READY (a days-only request is unchanged). Per life: one item per (netuid, life) (generation, life_start_height; null for a netuid without a recorded life), by netuid then generation: a re-registration day is split between the two lives (each event counts for the life its subnet had at its block). While per-life items are not available yet, one item per netuid with those members null. Errors are application/problem+json: INVALID_NETUID, INVALID_DAYS, INVALID_DAY, INVALID_RANGE, INVALID_CURSOR, UNKNOWN_PARAMETER, NOT_READY (503), NOT_FINAL (503), SOURCE_TIMEOUT (503), SOURCE_NOT_READY (503). meta.final_through_day is the key to cache closed days by: the rows through it never change again (but by an announced rerun); later rows may (null on an older data version's answer).
Beta: this route may change with one release's notice in the v2 changelog; additive changes need none (x-stability: beta).
Query parameters
- netuidsquery· string
Only these subnets. A comma list (or the parameter repeated) of subnets, each 0..65535, as many as needed; duplicates are ignored. Anything else is a 400
INVALID_NETUID.- daysquery· integer · default 30 · at least 1
How many closed UTC days end at
to_day(default 30, ending at the newest closed day; fewer where the daily flows starts later:meta.from_daysays where). No ceiling: a range longer than one page pages bycursor(while paged day windows are not available yet, more than 365 is a 400INVALID_DAYS). Not withfrom_day(both: a 400INVALID_RANGE). Outside 1..1,000,000 is a 400INVALID_DAYS.- from_dayquery· string (date)
The first UTC day,
YYYY-MM-DD, inclusive (raised to the first available day:meta.range.from_day_raised). Not withdays(both: a 400INVALID_RANGE); afterto_day: a 400INVALID_RANGE; not a date: a 400INVALID_DAY.- Format: date, YYYY-MM-DD
- to_dayquery· string (date)
The last closed UTC day,
YYYY-MM-DD, inclusive (default: the newest available day). Final or refused, never an earlier day: a day not available yet is a 503NOT_READY, one available but aftermeta.final_through_daya 503NOT_FINAL(retry). Today is a 503NOT_READY(closed days only), a later day a 400INVALID_RANGE, not a date a 400INVALID_DAY. A finalto_dayis cached as settled.- Format: date, YYYY-MM-DD
- cursorquery· string · up to 200 characters
meta.page.next_cursorof the previous page: the next days of a range longer than one page, sent back unchanged with the same other parameters (a changed or altered one is a 400INVALID_CURSOR). While paged day windows are not available yet: 503SOURCE_NOT_READY.
Response
data is a list of objects with these fields. Amounts are integer strings in their base unit, and null means unknown, never zero (see Units and formats). meta.at names the block the answer was read at.
One item per subnet life with any flow in the window: one per (netuid, life), by netuid then generation (null first).
- netuidinteger · unit id
The subnet slot.
- daysarray of objects
Oldest first; a day without any flow on the subnet has no entry (read it as zero flow).
14 fields in days (each item)
- daystring (date)
The UTC day.
- Format: date, YYYY-MM-DD
- heightinteger · unit block
The day's last block.
- stake_tao_raostring · unit rao (÷1e9)
TAO staked directly: StakeAdded's TAO less the legs of moves arriving, rao.
- Format: whole number, as a string · on chain: u64
- stakesinteger · unit count
Direct stakes (StakeAdded events that are not a move's leg).
- unstake_tao_raostring · unit rao (÷1e9)
TAO unstaked directly: StakeRemoved's TAO less the legs of moves leaving, rao.
- Format: whole number, as a string · on chain: u64
- unstakesinteger · unit count
Direct unstakes.
- moved_in_tao_raostring · unit rao (÷1e9)
TAO value moved in from other subnets (StakeMoved / StakeSwapped / StakeTransferred / StakeAndHotkeyTransferred, destination side), rao.
- Format: whole number, as a string · on chain: u64
- moves_ininteger · unit count
Moves arriving from another subnet.
- moved_out_tao_raostring · unit rao (÷1e9)
TAO value moved out to other subnets (origin side), rao.
- Format: whole number, as a string · on chain: u64
- moves_outinteger · unit count
Moves leaving for another subnet.
- net_move_tao_raostring · unit rao (÷1e9)
moved_in_tao_rao-moved_out_tao_rao, rao (checked).- Format: whole number, as a string · can be negative
- net_flow_tao_raostring · unit rao (÷1e9)
stake - unstake + moved in - moved out, rao (checked): the subnet's net TAO flow.
- Format: whole number, as a string · can be negative
- intra_subnet_moved_tao_raostring · unit rao (÷1e9)
Moves whose origin and destination are this subnet (a hotkey or owner change), rao: no net flow, in neither side above.
- Format: whole number, as a string · on chain: u64
- intra_subnet_movesinteger · unit count
Those moves.
- generationinteger · unit id · can be null
Opaque life id (the life's registration identifier), NOT a block height; use
life_start_heightfor the first block. The subnet life of this object's flows (GET /subnets/generations). One object per (netuid, life): a re-registration day is split between the two lives' objects (each event counts for the life its subnet had at the event's block). Null for a netuid without a recorded life (root), and on an older data version's answer.- is_current_lifeboolean · can be null
Whether
generationis the slot's current life (true) or an ended one, re-registered since (false). Null exactly whengenerationis null, or transiently when this API cannot read the lives. Root'sgeneration0 is current.- life_start_heightinteger · unit block · can be null
That life's first block. Null exactly when
generationis null.
Response headers
10 headers: ETag, Cache-Control, CDN-Cache-Control, X-BTAI-Stale, X-BTAI-Stale-As-Of, RateLimit-Policy, RateLimit, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
- ETag
Strong validator of this answer. Send it back as
If-None-Match: an unchanged answer is a 304 Not Modified without a body. A settled answer's validator leaves the chain head out, so it stays valid as the head moves.- Cache-Control
One of three classes: settled
public, max-age=3600, stale-while-revalidate=86400(pinned to a block that cannot move), slowpublic, max-age=300, stale-while-revalidate=600(state that moves in minutes or days) or tippublic, max-age=6, stale-while-revalidate=12(follows the chain head); the label routes are cached until the next nightly copy (public, max-age=<seconds>, stale-while-revalidate=60). Neverimmutable.no-storeon an earlier answer served because the data source failed (X-BTAI-Stale).- CDN-Cache-Control
The same class for shared caches (RFC 9213; browsers ignore it): settled 24 h, slow 300 s, tip 6 s, each with
stale-while-revalidateandstale-if-error;no-storewithX-BTAI-Stale.- X-BTAI-Stale
Present only when the data source failed to answer (it timed out or was unavailable) and an earlier answer to the same request is served instead of a 503 (stale if error, RFC 5861). Then
if-error, withX-BTAI-Stale-As-Of,Age(its seconds since then) andWarning: 110 - "Response is Stale", andCache-Control: no-store: the answer is never kept as fresh, and a later request reads again. Prices and quotes are never served this way.- X-BTAI-Stale-As-Of
With
X-BTAI-Stale: when the earlier answer served was produced, an RFC 3339 UTC time (2026-10-21T12:00:00Z).- RateLimit-Policy
The tier's request quota of the current window (IETF draft), e.g.
"tier";q=600.- RateLimit
Requests left in the current window and the seconds until it resets (IETF draft), e.g.
"tier";r=597;t=42.- X-RateLimit-Limit
The tier's request quota of the current window.
- X-RateLimit-Remaining
Requests left in the current window.
- X-RateLimit-Reset
When the current window resets, Unix seconds.
Status codes
200 · 304 · 400 · 401 · 402 · 403 · 404 · 429 · 500 · 502 · 503
304 Not Modified: the If-None-Match validator still matches; no body.
Error codes
The codes this endpoint can return. Each links to what it means and what to do.
- AMBIGUOUS_CREDENTIALS
- BAD_GATEWAY
- BILLING_UNAVAILABLE
- BUDGET_EXCEEDED
- CONCURRENCY_LIMIT
- INSUFFICIENT_PERMISSIONS
- INTERNAL_ERROR
- INVALID_CURSOR
- INVALID_DAY
- INVALID_DAYS
- INVALID_NETUID
- INVALID_RANGE
- NOT_FINAL
- NOT_READY
- PAYMENT_REQUIRED
- PLAN_REQUIRED
- RATE_LIMITED
- REPEATED_PARAMETER
- SERVICE_UNAVAILABLE
- SOURCE_BUSY
- SOURCE_NOT_READY
- SOURCE_TIMEOUT
- UNAUTHORIZED
- UNKNOWN_PARAMETER
- VALIDATION_ERROR
From the API's published specification, version 1.165.0.