Day, week or month lines of up to 250 accounts (POST)
https://api.bittensor.ai/api/v2/accounts/daily/batch- Status
- Beta
- Auth
- API key or OAuth access token
- Scope
data:read- Rate limit
plan
The lines of GET /accounts/{address}/daily for several accounts in one answer: rows newest period_start first, then by account, each with its address; meta.accounts lists every account once, in request order.
Full description
The lines of GET /accounts/{address}/daily for several accounts in one answer: rows newest period_start first, then by account, each with its address; meta.accounts lists every account once, in request order. With aggregate_only each period is one row summing the accounts (address null), and the rows cap counts periods only. Cost: a batch of more than 10 accounts is read in parts of 10 and served as one answer (the same rows, order and meta; any part failing fails the request with its 503), so the busiest 250 accounts' 7 days take about 2 s (up to about 10 s on a cold read). The body's unknown members are a 400 UNKNOWN_PARAMETER; the answer is not cached (no-store).
Per UTC day, week (Monday) or month (interval), what the account did: the fees it paid (payer side: tx_count, fee_tao_rao, fee_alpha by subnet, routine_fee_tao_rao), the extrinsics it signed (signer side: signed_count, routine calls by name), its TAO and stake transfers with other accounts (tao_in_rao, tao_out_rao, stake_in_tao_rao, stake_out_tao_rao, net_flow_tao_rao) and its income (income_alpha by subnet, income_tao_rao at each day's close). The payer and the signer differ under a proxy or a sponsoring hotkey owner, so tx_count and signed_count are counted apart. Income follows the income surfaces' rules: only what was credited to the account (claimable root dividends are never income). routine_fee_tao_rao is 0 today: the runtime charges routine calls (weights, axon) no fee.
Sparse: a period with nothing to report is absent; data is newest period_start first. The window is from_day..to_day (inclusive UTC days; default the 7 days ending today, the open day included), widened to whole periods; a to_day after today is served through today. The span is at most 366 days with interval=day and 3660 with week / month, and an answer holds at most 2000 rows (accounts x periods): above either a 400 RANGE_TOO_LARGE. Today's numbers are read live (has_open_day) and grow; a period is complete once it has ended and both sides cover it (meta.coverage). meta.accounts states each account's last activity overall and per group (transfer, staking, trades, income), whatever the window. An account the data source has never seen is served with no rows and null activity, never a 404.
Cached as tip while the window reaches today or a row is not final; otherwise for 5 minutes (the rows are final, the last activity in meta is not). Batch errors: ADDRESSES_REQUIRED, BATCH_TOO_LARGE, INVALID_ADDRESS (each invalid entry named by its index). Errors are application/problem+json: INVALID_DAY, INVALID_RANGE, INVALID_INTERVAL, RANGE_TOO_LARGE, UNKNOWN_PARAMETER, SOURCE_TIMEOUT (503), SOURCE_NOT_READY (503: this deployment's data source is not configured or does not have the route's data yet), SERVICE_UNAVAILABLE (503).
Beta: this route may change with one release's notice in the v2 changelog; additive changes need none (x-stability: beta).
Request body
A JSON object with these fields:
- addressesarray of string
The accounts (any account: coldkey or hotkey), SS58 or 0x + 64 hex, 1..250, served in this order (a duplicate once). An empty list is a 400
ADDRESSES_REQUIRED, more than 250 a 400BATCH_TOO_LARGE, an invalid one a 400INVALID_ADDRESSnaming its index (addresses[i]).- from_daystring · can be null
As the GET form's
from_day.- to_daystring · can be null
As the GET form's
to_day.- intervalenum · optional
As the GET form's
interval.- One of:
day,week,month - aggregate_onlyboolean · optional
One row per period summing every account (
addressnull): the rows cap counts periods only, so a long window of many accounts fits.
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.
The periods with anything to report (a period with nothing is absent), newest period_start first, then by account; [] when none.
- addressobject · can be null
The account, as
{ss58, hex}. Null on anaggregate_onlyanswer (each row sums the accounts).2 fields in address
- ss58string
The account, SS58 (prefix 42).
- Format: SS58 address
- hexstring
The same 32-byte account id, 0x + 64 lower-case hex (the public key).
- Format: 32-byte hex: 0x and 64 hex digits
- periodenum
The interval asked for:
day,week(Monday UTC) ormonth(UTC).- One of:
day,week,month - period_startstring (date)
The period's first UTC day.
- Format: date, YYYY-MM-DD
- period_endstring (date)
The period's last UTC day (a week's Sunday, a month's last day), even when after today.
- Format: date, YYYY-MM-DD
- completeboolean
The period has ended and every day of it is covered on both sides (fees / flow and income:
meta.coverage). False for a period holding today and for one reaching before a side'sclosed_from_day.- has_open_dayboolean
The period includes today (UTC), read live up to
meta.tip_height: its numbers still grow.- active_daysinteger · unit count
Days of the period with anything to report (a fee, a signed extrinsic, a transfer, income).
- tx_countinteger · unit count
Extrinsics whose fee the account paid. PAYER side: the account paid the fee (
TransactionFeePaid.who: the signer, or a proxy's real account / a sponsoring hotkey owner).- fee_tao_raostring · unit rao (÷1e9)
Those fees in TAO (the actual fee, tip included), rao of TAO. PAYER side: the account paid the fee (
TransactionFeePaid.who: the signer, or a proxy's real account / a sponsoring hotkey owner).- Format: whole number, as a string
- fee_alphaarray of objects
Fees paid in alpha (
TransactionFeePaidWithAlpha), by subnet, ascending netuid;[]when none. PAYER side: the account paid the fee (TransactionFeePaid.who: the signer, or a proxy's real account / a sponsoring hotkey owner).2 fields in fee_alpha (each item)
- netuidinteger · unit id
The subnet (0 = root, whose amounts are TAO).
- alpha_raostring · unit alpha_rao (÷1e9)
The amount on that subnet, rao of its alpha (rao of TAO on root).
- Format: whole number, as a string
- routine_fee_tao_raostring · unit rao (÷1e9)
The part of
fee_tao_raopaid for routine calls (weights, commits / reveals, axon / prometheus), rao of TAO. 0 today: the runtime charges those calls no fee. PAYER side: the account paid the fee (TransactionFeePaid.who: the signer, or a proxy's real account / a sponsoring hotkey owner).- Format: whole number, as a string
- signed_countinteger · unit count
SIGNER side: extrinsics the account signed, whoever paid their fee.
- routinearray of objects
SIGNER side: the routine calls among them (weights, commits / reveals, axon / prometheus), by call, ascending
call; the extrinsic's own call (a proxied one counts as the proxy call);[]when none.2 fields in routine (each item)
- callstring
The call,
Pallet.call_name(e.g.SubtensorModule.set_weights).- countinteger · unit count
How many the account signed in the period.
- tao_in_raostring · unit rao (÷1e9)
TAO received by
Balances.Transfer, rao of TAO. Transfers between distinct accounts only (a transfer to itself is excluded).- Format: whole number, as a string
- tao_out_raostring · unit rao (÷1e9)
TAO sent by
Balances.Transfer, rao of TAO. Transfers between distinct accounts only (a transfer to itself is excluded).- Format: whole number, as a string
- stake_in_tao_raostring · unit rao (÷1e9)
Stake received from other coldkeys (
StakeTransferredto it), at its TAO value at the transfer, rao of TAO.- Format: whole number, as a string
- stake_out_tao_raostring · unit rao (÷1e9)
Stake sent to other coldkeys (
StakeTransferredfrom it), at its TAO value at the transfer, rao of TAO.- Format: whole number, as a string
- net_flow_tao_raostring · unit rao (÷1e9)
tao_in - tao_out + stake_in - stake_out, rao of TAO, signed (fees and income are not in it).- Format: whole number, as a string · can be negative
- income_alphaarray of objects
Income credited to the account (the coldkey credited: emission minted to it), by subnet, ascending netuid (root's in TAO);
[]when none. Claimable root dividends are never income (only what was credited counts, as on the income surfaces).2 fields in income_alpha (each item)
- netuidinteger · unit id
The subnet (0 = root, whose amounts are TAO).
- alpha_raostring · unit alpha_rao (÷1e9)
The amount on that subnet, rao of its alpha (rao of TAO on root).
- Format: whole number, as a string
- income_tao_raostring · unit rao (÷1e9) · can be null
That income in TAO: each day's alpha at that day's closing pool price (the open day at
meta.coverage.income.open_through_height; root 1:1), floored per subnet-day and summed, rao of TAO. Null when a subnet of the period had no price.- Format: whole number, as a string
Response headers
6 headers: Cache-Control, RateLimit-Policy, RateLimit, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
- 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).- 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 · 400 · 401 · 402 · 403 · 404 · 429 · 500 · 502 · 503
Error codes
The codes this endpoint can return. Each links to what it means and what to do.
- ADDRESSES_REQUIRED
- ADDRESS_NOT_IN_PLAN_SCOPE
- AMBIGUOUS_CREDENTIALS
- BAD_GATEWAY
- BATCH_TOO_LARGE
- BILLING_UNAVAILABLE
- BUDGET_EXCEEDED
- CONCURRENCY_LIMIT
- INSUFFICIENT_PERMISSIONS
- INTERNAL_ERROR
- INVALID_ADDRESS
- INVALID_BOOLEAN
- INVALID_DAY
- INVALID_INTERVAL
- INVALID_PARAMETER
- INVALID_RANGE
- PAYMENT_REQUIRED
- RANGE_TOO_LARGE
- RATE_LIMITED
- SERVICE_UNAVAILABLE
- SOURCE_BUSY
- SOURCE_NOT_READY
- SOURCE_TIMEOUT
- UNAUTHORIZED
- UNKNOWN_PARAMETER
- VALIDATION_ERROR
From the API's published specification, version 1.165.0.