Blocks
Operations for retrieving block and microblock data.
Get a specific Nakamoto block (Stacks 3.x+) by its index block hash. This endpoint streams the block data from the Nakamoto staging blocks database where Nakamoto blocks are stored with additional metadata including tenure information.
Compatibility: Works with Nakamoto blocks only. For Stacks 2.x blocks, use /v2/blocks/{block_id}.
The block"s ID hash
The raw SIP-003-encoded block will be returned.
Bad request
Not found
Internal Server Error
Fetch a Nakamoto block by its height and optional tip.
The block's height
Stacks chain tip to query from. Options:
- (empty/omitted): Use latest anchored tip (canonical confirmed state)
latest: Use latest known tip including unconfirmed microblocks{block_id}: Use specific block ID (64 hex characters)
latestPattern: ^(latest|[0-9a-f]{64})?$The raw SIP-003-encoded block will be returned.
Bad request
Not found
Internal Server Error
Fetch metadata about the ongoing Nakamoto tenure. This information is sufficient to obtain and authenticate the highest complete tenure, as well as obtain new tenure blocks.
Metadata about the ongoing tenure
Metadata about the ongoing tenure
Fetch a sequence of Nakamoto blocks in a tenure. The blocks will be served in order from highest to lowest. The blocks will be encoded in their SIP-003 wire format, and concatenated together.
The tenure-start block ID of the tenure to query
The block ID hash of the highest block in this tenure that is already known to the caller. Neither the corresponding block nor any of its ancestors will be served. This is used to fetch tenure blocks that the caller does not have.
SIP-003-encoded Nakamoto blocks, concatenated together
SIP-003-encoded Nakamoto blocks, concatenated together
Get the list of blocks in a tenure. The blocks will be shown in order from highest to lowest.
The hex-encoded consensus hash of the tenure to query (40 hexadecimal characters, without 0x prefix)
^[0-9a-f]{40}$List of Stacks blocks in the tenure
Bad request
Not found
Internal Server Error
Get the list of Nakamoto Stacks blocks in a tenure given Bitcoin block hash
Get the list of Nakamoto blocks in a tenure given the Bitcoin block hash. The blocks will be shown in order from highest to lowest. This is only for Nakamoto blocks, Epoch2 ones will not be shown.
The hex-encoded Bitcoin block hash of the tenure to query (64 hexadecimal characters, without 0x prefix)
^[0-9a-f]{64}$List of Stacks blocks in the tenure
Bad request
Not found
Internal Server Error
Get the list of Nakamoto Stacks blocks in a tenure given Bitcoin block height
Get the list of Nakamoto blocks in a tenure given the Bitcoin block height. The blocks will be shown in order from highest to lowest. This is only for Nakamoto blocks, Epoch2 ones will not be shown.
The Bitcoin block height of the tenure to query
List of Stacks blocks in the tenure
Bad request
Not found
Internal Server Error
Get sortition information about the latest burnchain block processed by this node. Returns a single-element array with the latest sortition.
Latest sortition information
Bad request
Not found
Internal Server Error
Get sortition information about the latest burn block with a winning miner AND the previous such burn block. Returns an array with two sortition objects.
Latest and last sortition information
Bad request
Not found
Internal Server Error
Get sortition information for a specific consensus hash. Returns a single-element array with the matching sortition.
Hex-encoded consensus hash (40 characters)
^(0x)?[0-9a-f]{40}$Sortition information for the consensus hash
Bad request
Not found
Internal Server Error
Get sortition information for a specific burn header hash. Returns a single-element array with the matching sortition.
Hex-encoded burn header hash (64 characters)
^(0x)?[0-9a-f]{64}$Sortition information for the burn header hash
Bad request
Not found
Internal Server Error
Get sortition information for a specific burn block height. Returns a single-element array with the matching sortition.
Burn block height (integer)
Sortition information for the burn block height
Bad request
Not found
Internal Server Error
Get number of blocks signed by signer during a given reward cycle
Get number of blocks signed by signer during a given reward cycle
Hex-encoded compressed Secp256k1 public key of signer
^0[23][0-9a-f]{64}$Reward cycle number
Stacks chain tip to query from. Options:
- (empty/omitted): Use latest anchored tip (canonical confirmed state)
latest: Use latest known tip including unconfirmed microblocks{block_id}: Use specific block ID (64 hex characters)
latestPattern: ^(latest|[0-9a-f]{64})?$Number of blocks signed
Number of blocks signed
Get microblocks that were confirmed by the given anchored block. The microblocks are returned as a binary stream of concatenated microblock data.
Hex-encoded Stacks block ID (64 characters)
^[0-9a-f]{64}$Stacks chain tip to query from. Options:
- (empty/omitted): Use latest anchored tip (canonical confirmed state)
latest: Use latest known tip including unconfirmed microblocks{block_id}: Use specific block ID (64 hex characters)
latestPattern: ^(latest|[0-9a-f]{64})?$Stream of confirmed microblocks
Not found
Internal Server Error
Get a stream of microblocks beginning
with the given microblock (Epoch 2.x).
Hex-encoded microblock hash (64 characters)
^[0-9a-f]{64}$The microblock data
Bad request
Not found
Internal Server Error
Get unconfirmed microblocks starting from a specific sequence number. The microblocks are returned as a binary stream.
Hex-encoded parent block ID (64 characters)
^[0-9a-f]{64}$Starting sequence number (0-65535)
Stream of unconfirmed microblocks
Bad request
Not found
Internal Server Error
Submit a microblock to the node for validation and relay. The body must be the SIP-003 binary serialization of a Microblock and sent with Content-Type: application/octet-stream.
Index-block hash of the accepted microblock
32-byte block-header hash (hex)
^[0-9a-f]{64}$Bad request
Not found
Internal Server Error
Deprecated: This endpoint is deprecated since Nakamoto.** Stream (as a JSON array) up to quantity most recent anchored Stacks block headers. The result is ordered from the current tip backwards.
Number of headers to return (max 256)
Stacks chain tip to query from. Options:
- (empty/omitted): Use latest anchored tip (canonical confirmed state)
latest: Use latest known tip including unconfirmed microblocks{block_id}: Use specific block ID (64 hex characters)
latestPattern: ^(latest|[0-9a-f]{64})?$Array of block headers
Bad request
Not found
Internal Server Error
Get a specific Stacks 2.x era block by its block ID. This endpoint streams the block data from the filesystem storage where traditional Stacks blocks are stored as individual files.
Compatibility: Works with all Stacks 2.x blocks. For Nakamoto blocks (Stacks 3.x+), use /v3/blocks/{block_id}.
Hex-encoded block ID (64 characters)
^[0-9a-f]{64}$The block data
Bad request
Not found
Internal Server Error
Get information about tenure forking between two consensus hashes. This is used to identify conflicting tenures in the Nakamoto consensus.
Starting consensus hash (40 hexadecimal characters, without 0x prefix)
^[0-9a-f]{40}$Stopping consensus hash (40 hexadecimal characters, without 0x prefix)
^[0-9a-f]{40}$Ordered list of tenure fork events from stop back to (and including) start
Bad request
Not found
Internal Server Error
Get the tip block of a tenure identified by consensus hash.
Consensus hash (40 characters)
^[0-9a-f]{40}$Tenure tip block information
JSON encoding of StacksBlockHeaderTypes returned by /v3/tenures/tip.
Exactly one variant property will be present: either Epoch2 or Nakamoto.
Bad request
Not found
Internal Server Error
Upload a Nakamoto block to the node for processing.
Body - must be the binary (SIP-003) serialization of a
NakamotoBlock.Authentication - only required when the query parameter
broadcast=1is supplied. In that case the caller must include anAuthorizationheader.
Plain-text secret value that must exactly equal the node's
configured password, which is set as connection_options.auth_token
in the node's configuration file.
If set to "1" the node will broadcast the uploaded block to peers.
When present the request must include a valid Authorization header.
Binary SIP-003 encoding of a NakamotoBlock
Block upload result.
Bad request
Unauthorized. Invalid or missing authentication token.
Internal Server Error
Replay the mining of a block (no data is written in the MARF) and returns its content.
Plain-text secret value that must exactly equal the node's
configured password, which is set as connection_options.auth_token
in the node's configuration file.
The block ID hash
^[0-9a-f]{64}$Content of the replayed block
Bad request
Unauthorized. Invalid or missing authentication token.
Not found
Internal Server Error
Last updated
Was this helpful?
