Skip to main content

Blocks

GET /api/v1/blocks, block detail/extrinsics/events, block-production analytics, and the runtime-version transition timeline — the base layer everything else is anchored to. No API key.

Last updated

Bittensor's subtensor chain is a Substrate chain, producing a finalized block roughly every 12 seconds. Each block has a header (a parent hash linking it to the one before, plus a state root and extrinsics root committing to what changed) and a body — the ordered extrinsics it carried. This page covers the block-level surface everything else (extrinsics, chain events, account activity) is anchored to.

GET https://api.metagraph.sh/api/v1/blocks

GET /api/v1/blocks

Recent-block feed, newest first.

ParamNotes
limit1–100, default 50.
offset / cursorOffset or keyset paging. Out-of-range values clamp rather than error.
authorScope to one block-authoring validator.
spec_versionScope to one runtime spec version.
block_start / block_endBlock-number range.
from / toEpoch-ms observed-at range.
min_extrinsics / min_eventsFloor filters — numeric input, 400s on non-integer.
formatcsv.
curl -s 'https://api.metagraph.sh/api/v1/blocks?min_extrinsics=5&limit=10'

GET /api/v1/blocks/{ref}

One block's header — {ref} accepts either a decimal block number or a 0x + 64-hex block hash. An unknown block never 404s: it returns { block: null } with a 200. The response includes the nearest stored prev/next_block_number for chain-walk navigation.

curl -s https://api.metagraph.sh/api/v1/blocks/5000000

Extrinsics & events in one block

PathReturnsParams
GET /api/v1/blocks/{ref}/extrinsicsThe extrinsics in this block, index-ascending.limit (≤100), offset, format=csv
GET /api/v1/blocks/{ref}/eventsCurated, account-attributed events (a fixed allowlist of "interesting" kinds).limit (≤1000), offset, format=csv
GET /api/v1/blocks/{ref}/chain-eventsEvery raw pallet.method event in this block, unfiltered — no limit/offset, returns the whole block.numeric block_number only, no hash form

chain-events is a proxy with its own rate limit

/blocks/{ref}/chain-events forwards to a separate deep-history Worker over a service binding, the same tier documented in full on the chain events reference — including its own 60 req/60s rate limiter and the 503 you'll get if that binding isn't wired into a deployment. See that page rather than duplicating it here.

Block-production analytics & runtime versions

PathPurpose
GET /api/v1/blocks/summaryInter-block timing, throughput, author decentralization, spec-version spread.
GET /api/v1/runtimeThe runtime spec-version transition timeline — every distinct spec_version seen, earliest block for each.

/api/v1/runtime reports only spec_version (not the full Substrate RuntimeVersion struct), read directly off each block's own spec_version column — that column only started being captured from a fixed point on, so coverage_from_block/coverage_from_at mark where the recorded history actually begins. It's grouped with Blocks rather than a general "chain" surface because it's a pure aggregate over the same block-header data /blocks/summary's latest_spec_version field also derives from.

current_spec_version isn't just the last transition

Grouping by spec version collapses each one to its earliest block — so if a version were ever superseded and then reappeared, naively reading the last transition would report the wrong one as current. current_spec_version is computed as a separate query instead.

const res = await fetch("https://api.metagraph.sh/api/v1/blocks/summary");
const { data } = await res.json();

/blocks/{ref} caches 600s once resolved (finalized blocks are immutable) and 60s while unknown; every other route here caches 60s.