Events, filtered
https://api.bittensor.ai/api/v2/events- Status
- Stable
- Auth
- API key or OAuth access token
- Scope
data:read- Rate limit
plan
Events with their named args (always included), filtered by event kind or pallet, phase, extrinsic, the call that emitted them (call, a call id), subnet (netuid: any mechanism) and hotkey.
Full description
Events with their named args (always included), filtered by event kind or pallet, phase, extrinsic, the call that emitted them (call, a call id), subnet (netuid: any mechanism) and hotkey. netuid and hotkey apply only to kinds that carry the field: a pallet list is narrowed to its kinds that carry it (pallet=SubtensorModule&netuid=1 is that pallet's subnet events), and an event list naming a kind without it is a 400 FILTER_NOT_SUPPORTED. Newest first (order=desc, the default) or oldest first (asc); with no range, the newest rows over all history (no hidden window). from_height / to_height are inclusive heights, from_time / to_time a half-open time window. Cursor paging; with_total=true on the first page (ignored with a cursor) adds meta.page.total and total_exact: exact for an unfiltered list, a kind, a height or time window, or a window and a kind; an index-driven list (netuid, hotkey, signer, origin) or another filter is counted up to 100,000 (total_exact false at the cap: show it as 100,000+); null when it cannot be counted (unknown, never a partial count); a page carrying a total follows the tip. Filters without an index of their own scan at most 20,000 candidates per request (5,000 with args_filter: each candidate's args are rendered), so a page can be short or empty with a non-null next_cursor (meta.page.scan_limited, meta.page.scanned_through_height): keep paging until next_cursor is null. A page bounded below the head (by to_height / to_time, or a cursor page) is cached as settled, unless it reaches, or continues into, blocks below meta.coverage.from_height that are still being indexed. Typed filters (netuid, hotkey) read an index that is still being filled downward from the head: while it is, meta.coverage.from_height is its floor and complete_from_genesis false (older matches are not served yet; never silently partial), and before it covers anything the answer is 503 NOT_READY. Accounts at the top level of a row (signer, wrapped.real, origin.account, tx_fee.payer, gas_fee.payer) are SS58; gas_fee.from stays the EVM sender's H160 hex. args are named fields as the data source renders them (accounts in them already SS58), versioned by meta.data_version's args/... part. Errors are application/problem+json: INVALID_EVENT, INVALID_PALLET, UNKNOWN_EVENT, INVALID_PHASE, INVALID_ID, INVALID_ADDRESS, INVALID_NETUID, FILTER_NOT_SUPPORTED, INVALID_HEIGHT, INVALID_TIME, INVALID_RANGE, INVALID_ORDER, INVALID_LIMIT, INVALID_CURSOR, INVALID_ARGS_FILTER, SCOPE_REQUIRED, NOT_READY (503), UNKNOWN_PARAMETER, SOURCE_TIMEOUT (503), SOURCE_NOT_READY (503).
Query parameters
- eventquery· array of string
An event kind,
Pallet.EventName(e.g.SubtensorModule.StakeAdded); repeat for several (OR, and OR withpallet). 400INVALID_EVENTfor a malformed one,UNKNOWN_EVENTfor one the chain never had.- palletquery· array of string
A pallet (e.g.
SubtensorModule): every call (event) of it; repeat for several. 400INVALID_PALLETfor a malformed name,UNKNOWN_CALL/UNKNOWN_EVENTfor an unknown one.- phasequery· enum · one of initialization, extrinsic, finalization
Only the events of this phase:
initialization,extrinsicorfinalization. Finalization-phase events stopped after block 9,155,260 (the runtime emits none since), sofinalizationmatches older blocks only.- extrinsicquery· string
Only the events of this extrinsic, by id (
{height}-{index}; 400INVALID_IDotherwise).- callquery· string
Only the events this call emitted, by call id (
{height}-{ext}[.{child}...]; 400INVALID_IDotherwise).- netuidquery· integer · 0 to 65535
Only events carrying this subnet (a
netuid_indexmatches its subnet).- hotkeyquery· string
Only events carrying this hotkey: SS58, or 0x + 64 hex.
- from_heightquery· integer · 0 to 2147483647
Only rows at or above this height (inclusive).
- to_heightquery· integer · 0 to 2147483647
Only rows at or below this height (inclusive).
- from_timequery· string (date-time)
Only rows at or after this time (RFC 3339).
- Format: date and time, ISO 8601 in UTC
- to_timequery· string (date-time)
Only rows before this time (RFC 3339; exclusive).
- Format: date and time, ISO 8601 in UTC
- orderquery· enum · one of desc, asc · default desc
desc(newest first, the default) orasc(oldest first).- limitquery· integer · default 25 · 1 to 1000
Page size, 1..1000 (default 25).
- cursorquery· string · up to 200 characters
meta.page.next_cursorof the previous page, passed back unchanged with the same other parameters. It is opaque and bound to them: a cursor used with different parameters, or altered, is a 400INVALID_CURSOR.- includequery· string
namesadds the top-levelincluded.names: every distinct account on the page (accounts indataat any depth, event args included) keyed by its SS58 address, each{identity: {name} | null, label: {text, source, confidence, verified, inferred, as_of} | null}; the on-chain identity and the off-chain label are kept apart, and a label is never a chain fact. A missing key means 'not looked up', null means 'none'. At most 500 accounts (included.names_truncated). Still one call (the data source sideloads them in the same statement); an answer with names is cached as a head answer (names follow the head). Anything else is a 400INVALID_INCLUDE.- args_filterquery· string
Only rows whose named args match. A JSON object, or an array of objects (OR of groups), matched against the rows' args as served (v2 names, accounts SS58: a 0x 32-byte account in the filter is normalised to SS58; amounts compare as the served decimal strings). Inside an object every key must match; a key whose value is an array matches any of its values; a nested object matches partially. At most 16 groups and 2048 characters; 400
INVALID_ARGS_FILTERotherwise. It needs a scope, a filter backed by an index:event,pallet,netuid,hotkey,extrinsicorcall(400SCOPE_REQUIREDwithout one). A filtered page scans at most 5,000 candidates (seemeta.page.scan_limited). Example:args_filter={"netuid":64}withevent=SubtensorModule.StakeAdded.- with_totalquery· enum · one of true, false
true: on the first page (ignored with acursor), addmeta.page.totalandmeta.page.total_exact: exact for an unfiltered list, a kind, a height or time window, or a window and a kind; capped at 100,000 on an account, subnet or hash index or another filter (total_exactfalse: show "100,000+"); null when it cannot be counted.trueorfalse(lower-case; anything else is a 400INVALID_BOOLEAN).
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.
Events in order by (height, index). Can be shorter than limit, even empty, with a non-null meta.page.next_cursor (meta.page.scan_limited).
- idstring · unit id
The event's id,
{height}-{index}(index = its position in the block's System.Events).- Format: block and index, such as 4200000-3
- heightinteger · unit block
The block it was emitted in.
- indexinteger · unit id
Its index in the block's System.Events (0-based).
- timestring (date-time) · can be null
The block's Timestamp.set (RFC 3339 UTC, milliseconds). Null for block 0 only.
- Format: date and time, ISO 8601 in UTC
- phasestring
When it was emitted:
initialization(block hooks before the extrinsics, e.g. emission),extrinsic(while applying an extrinsic) orfinalization(block hooks after them; none after block 9,155,260). New values may be added; show an unknown value as is (or generically).- extrinsic_idstring · unit id · can be null
The extrinsic it was emitted under (
{height}-{index}); null in theinitializationandfinalizationphases.- Format: block and index, such as 4200000-3
- dispatch_phasestring · can be null
Where in applying its extrinsic the event was emitted, from the chain's per-event trace:
pre_dispatch(before the call ran: the fee withdraw),dispatch(by the call or the calls it dispatched) orpost_dispatch(after it: the fee refund, TransactionFeePaid, System.ExtrinsicSuccess / ExtrinsicFailed). Null outside theextrinsicphase, and below block 7,089,968 (before the trace covers). New values may be added; show an unknown value as is (or generically).- call_idstring · unit id · can be null
The call that emitted it (a call id). Null outside a dispatched call: the block phases, and the extrinsic's pre- and post-dispatch events (
dispatch_phasepre_dispatch/post_dispatch: the fee withdraw, the refund, TransactionFeePaid, ExtrinsicSuccess / ExtrinsicFailed), which no call emits, so per-call event lists and counts never include them. Below block 7,089,968 (dispatch_phasenull) the attribution is the event dictionary's, which puts a wrapper's pre-dispatch events on its first child.- Pattern:
^[0-9]+-[0-9]+(\.[0-9]+)*$ - eventobject
The event's kind.
2 fields in event
- palletstring
The pallet, as in the runtime metadata (e.g.
SubtensorModule).- namestring
The event, as in the runtime metadata (PascalCase, e.g.
StakeAdded).
- argsobject · can be null
The arguments as named fields, served exactly as the data source renders them (never re-rendered here). Names: the block's runtime metadata names each field (snake_case); unnamed tuple fields take their names from a reviewed list of override names (each entry traced to the subtensor source), else the snake_case of the field's type name (
_2,_3when repeated), elsearg0,arg1. A field typedNetUidStorageIndexis alwaysnetuid_index(= mechanism × 4096 + netuid), never a netuid. Values: accounts (AccountId32 by metadata type) are SS58; amounts are decimal strings in their base unit; enums are{__kind, value}; hashes and bytes are 0x hex; a nested call (batch, proxy, sudo) is{pallet, name, args}. The naming rule and the override names are versioned inmeta.data_version(args/<rule>.<overrides>), so a renamed field is a new version. Free-form: the members depend on the kind and the runtime, so this schema does not list them. Null only when the source stored no arguments.- error_palletstring · can be null
The DispatchError this event carries, decoded with the block's runtime: for a module error the pallet that raised it (e.g.
Swap), as an extrinsic'serror.pallet. Carried by System.ExtrinsicFailed, Utility.BatchInterrupted / ItemFailed, and theErrresults of Proxy.ProxyExecuted, Multisig.MultisigExecuted, Sudo.Sudid / SudoAsDone, Utility.DispatchedAs and Scheduler.Dispatched. Null on every other event, on anOkresult, for a non-module error (BadOrigin,Token, ...) and when the error could not be decoded.- error_namestring · can be null
The DispatchError's name, as an extrinsic's
error.name: a module error's (e.g.PriceLimitExceeded,HotKeyAlreadyRegisteredInSubNet), or the inner variant of aToken/Arithmetic/Transactionalerror (error_palletthen null). Null when the event carries no DispatchError, or it has no name (BadOrigin, an undecoded error).
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
- FILTER_NOT_SUPPORTED
- INSUFFICIENT_PERMISSIONS
- INTERNAL_ERROR
- INVALID_ADDRESS
- INVALID_ARGS_FILTER
- INVALID_BOOLEAN
- INVALID_CURSOR
- INVALID_EVENT
- INVALID_HEIGHT
- INVALID_ID
- INVALID_INCLUDE
- INVALID_LIMIT
- INVALID_NETUID
- INVALID_ORDER
- INVALID_PALLET
- INVALID_PHASE
- INVALID_RANGE
- INVALID_TIME
- NOT_READY
- PAYMENT_REQUIRED
- PLAN_REQUIRED
- RATE_LIMITED
- REPEATED_PARAMETER
- SCOPE_REQUIRED
- SERVICE_UNAVAILABLE
- SOURCE_BUSY
- SOURCE_NOT_READY
- SOURCE_TIMEOUT
- UNAUTHORIZED
- UNKNOWN_EVENT
- UNKNOWN_PARAMETER
- VALIDATION_ERROR
From the API's published specification, version 1.165.0.