A hotkey's weights in force on each subnet and mechanism
https://api.bittensor.ai/api/v2/hotkeys/{hotkey}/weights/latest- Status
- Beta
- Auth
- API key or OAuth access token
- Scope
data:read- Rate limit
plan
For each.
Full description
For each (subnet, mechanism) the hotkey has submitted weights on, its latest submission (kind set or reveal, how it was written, the block and the extrinsic) with the raw u16 dests / weights exactly as the chain stores them, never normalised: a weight is meaningful only as a share of its vector, so divide each by the sum of weights for the fraction a target receives. status says whether that vector is still the one stored now: in_force, rewritten (the runtime changed it since: after is the vector stored now), cleared (removed since: nothing is stored now) or replaced (another hotkey took the uid and submitted: after is that submission). kind, source, status and after.source are open vocabularies: show an unknown value as is. Ordered by netuid, then mechid; a hotkey that submitted nothing is a 200 with vectors: []. Coverage: submissions from block 8,632,000 (about 90 days before 2026-10-18) to meta.coverage.to_height; a subnet whose latest submission by the hotkey is older is not listed. History of every submission: GET /hotkeys/{hotkey}/weights. The hotkey is SS58. Latest only (no at): cached as the head. Errors are application/problem+json: INVALID_ADDRESS (hotkey), INVALID_NETUID, INVALID_MECHID, UNKNOWN_PARAMETER, NOT_READY (503: the weights history does not reach block 8,632,000 yet on this deployment; retry later), SOURCE_TIMEOUT (503), SOURCE_NOT_READY (503: this deployment's data source does not serve weights in force 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).
Path parameters
- hotkeypath, required· string
The hotkey: SS58, or 0x + 64 hex.
Query parameters
- netuidsquery· string
Only these subnets: a comma list (or the parameter repeated) of 1..4096 netuids, each 0..4095 (duplicates ignored). Omitted: every subnet. Anything else is a 400
INVALID_NETUID.- mechidquery· integer · 0 to 15
Only this subnet mechanism, 0..15 (0 is a subnet's first or only mechanism). Omitted: every mechanism. Anything else is a 400
INVALID_MECHID.
Response
data is an object 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 hotkey and its weight vectors.
- hotkeystring
The hotkey asked for, SS58 (prefix 42).
- Format: SS58 address
- vectorsarray of objects
One entry per (subnet, mechanism) the hotkey has submitted weights on within
meta.coverage(only the subnets innetuids/ the mechanismmechidwhen given), ordered by netuid, then mechid. Empty when it submitted none there.16 fields in vectors (each item)
- netuidinteger · unit id
The subnet.
- mechidinteger · unit id
The subnet mechanism the weights are for; 0 when the subnet has one.
- uidinteger · unit id
The uid whose weight vector this is (the hotkey's uid on the subnet at the submission).
- 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's life atheight(seeGET /subnets/generations); null if not known.- life_start_heightinteger · unit block · can be null
The first block of the life
generationnames (GET /subnets/generations'start_height): use it, nevergeneration, for heights, ages and dates. Null exactly whengenerationis null (root without a life, no subnet), or transiently when this API cannot read the lives. Root'sgeneration0 starts at 0.- 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.- kindstring
set(set_weights, set_mechanism_weights, batch_set_weights, set_tao_weights, set_root_weights) orreveal(reveal_weights and its mechanism / batch forms, or a timelocked / CRV3 reveal). New values may be added; show an unknown value as is (or generically).- sourcestring
How the vector was written:
call(by the extrinsic's call),timelocked_revealorcrv3_reveal(revealed by the runtime at the start of the block, outside any extrinsic). New values may be added; show an unknown value as is (or generically).- heightinteger · unit block
The block the vector was written in (took effect).
- block_timestring (date-time) · can be null
That block's time, RFC 3339 UTC; null if the block is not known.
- Format: date and time, ISO 8601 in UTC
- extrinsic_indexinteger · unit id · can be null
The extrinsic of the call in its block (
/api/v2/extrinsics/{height}-{extrinsic_index}); null for a timelocked or CRV3 reveal.- item_indexinteger · unit id · can be null
With
heightandextrinsic_index, the submission's row inGET /hotkeys/{hotkey}/weights; null for a timelocked or CRV3 reveal.- destsarray of integer
The target uids, in the order the chain stores them (pairs with
weightsby position). As submitted.- weightsarray of integer
The raw u16 weights (0..65535) as the chain stores them, one per
destsentry, never normalised. A weight means something only as a share of its own vector: divide each by the sum ofweightsfor the fraction each target receives (an all-zero or empty vector gives no fractions). As submitted.- statusstring
What has happened at this vector's key (
netuid,mechid,uid) since this submission:in_force(nothing written there since: the vector stored now is the one submitted;afteris null),rewritten(the runtime changed the stored vector without the hotkey acting, e.g. a registration zeroed the weight to a replaced uid or the uids were remapped;afterholds the vector stored now),cleared(the vector was removed, e.g. this uid was replaced, the subnet was dissolved or a runtime upgrade cleared it; nothing is stored at the key now andafteris the clear, with emptydests/weights) orreplaced(another hotkey has since submitted at the key: the uid changed hands;afteris that submission). Known limit: when the subnet owner trims the subnet's uids (sudo_trim_to_max_allowed_uids) and a vector moves to another uid, this readscleared. New values may be added; show an unknown value as is (or generically).- afterobject · can be null
What is stored at the key now when it is not this submission: the latest write there since (its vector is the one in force; empty when cleared). Null when
statusisin_force.dests/weightsabove stay the submission's.6 fields in after
- heightinteger · unit block
The block of that write.
- block_timestring (date-time) · can be null
That block's time, RFC 3339 UTC; null if the block is not known.
- Format: date and time, ISO 8601 in UTC
- sourcestring
What wrote it:
target_zeroed,uid_remaporroot_rewrite(statusrewritten: the runtime changed the vector);cleared,subnet_clearedormigration_cleared(statuscleared: the uid's vector removed, the subnet dissolved, a runtime upgrade);call,timelocked_revealorcrv3_reveal(statusreplaced: another hotkey's submission, assourceabove). New values may be added; show an unknown value as is (or generically).- extrinsic_indexinteger · unit id · can be null
The extrinsic of that write in its block (
/api/v2/extrinsics/{height}-{extrinsic_index}); null when the runtime wrote it outside any extrinsic (a block hook, a timelocked or CRV3 reveal).- destsarray of integer
The target uids stored at the key after that write; empty when it cleared the key.
- weightsarray of integer
The raw u16 weights stored at the key after that write, one per
destsentry; empty when it cleared the key. Normalise asweightsabove.
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_ADDRESS
- INVALID_MECHID
- INVALID_NETUID
- 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.