Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Hiro Blocks API

The Blocks API from Hiro — 37 operation(s) for blocks.

Hiro Blocks API is one of 26 APIs that Hiro publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Blocks. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 37 operations across 37 paths, and defines 10 schemas. It is described by OpenAPI 3.0.3, at version 1.0.3.

Requests are made against 2 base URLs: https://api.hiro.so/, https://api.testnet.hiro.so/.

37 operations 37 paths 10 schemas 35 GET2 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
1.0.3
Base URL
https://api.mainnet.hiro.so
Resource Areas
1

Paths & Operations 37

Across 37 paths, the API surfaces 37 operations — 35 GET, 2 POST. Each is listed below with its method, path, parameters, and response codes.

Blocks 37
GET
/signer-metrics/v1/blocks
Aggregated signer information for most recent blocks
getBlocks 2 params → 200
GET
/signer-metrics/v1/blocks/{height_or_hash}
Aggregated signer information for a block
getBlock 1 param → 200
GET
/extended/v1/block/deprecated
Get recent blocks
get_block_list 2 params → 2004XX
GET
/extended/v1/block/by_height/{height}deprecated
Get block by height
get_block_by_height 1 param → 2004XX
GET
/extended/v1/block/by_burn_block_height/{burn_block_height}deprecated
Get block by burnchain height
get_block_by_burn_block_height 1 param → 2004XX
GET
/extended/v1/block/{hash}deprecated
Get block by hash
get_block_by_hash 1 param → 2004XX
GET
/extended/v1/block/by_burn_block_hash/{burn_block_hash}deprecated
Get block by burnchain block hash
get_block_by_burn_block_hash 1 param → 2004XX
GET
/extended/v2/blocks/
Get blocks
get_blocks 3 params → 2004XX
GET
/extended/v2/blocks/average-times
Get average block times
get_average_block_times → 2004XX
GET
/extended/v2/blocks/{height_or_hash}
Get block
get_block 1 param → 2004XX
GET
/extended/v2/blocks/{height_or_hash}/signer-signatures
Get signer signatures for block
get_signer_signatures_for_block 3 params → 2004XX
GET
/extended/v2/block-tenures/{tenure_height}/blocks
Get blocks by tenure
get_tenure_blocks 4 params → 2004XX
GET
/v3/blocks/{block_id}
Get Nakamoto block by ID
getNakamotoBlockById 1 param → 200400404405500
GET
/v3/blocks/height/{block_height}
Fetch a Nakamoto block by its height and optional tip
getNakamotoBlockByHeight 2 params → 200400404500
GET
/v3/tenures/info
Fetch metadata about the ongoing Nakamoto tenure
getTenureInfo → 200
GET
/v3/tenures/{block_id}
Fetch a sequence of Nakamoto blocks in a tenure
getTenures 2 params → 200400404405500
GET
/v3/tenures/blocks/{consensus_hash}
Get the list of Stacks blocks in a tenure
getTenureBlocks 1 param → 200400404500
GET
/v3/tenures/blocks/hash/{burnchain_block_hash}
Get the list of Nakamoto Stacks blocks in a tenure given Bitcoin block hash
getTenureBlocksByHash 1 param → 200400404500
GET
/v3/tenures/blocks/height/{burnchain_block_height}
Get the list of Nakamoto Stacks blocks in a tenure given Bitcoin block height
getTenureBlocksByHeight 1 param → 200400404500
GET
/v3/sortitions
Get latest sortition information
getLatestSortitions → 200400404500
GET
/v3/sortitions/latest_and_last
Get latest and last winning sortitions
getLatestAndLastWinningSortitions → 200400404500
GET
/v3/sortitions/consensus/{consensus_hash}
Get sortition by consensus hash
getSortitionByConsensusHash 1 param → 200400404500
GET
/v3/sortitions/burn/{burn_header_hash}
Get sortition by burn header hash
getSortitionByBurnHeaderHash 1 param → 200400404500
GET
/v3/sortitions/burn_height/{height}
Get sortition by burn block height
getSortitionByBurnBlockHeight 1 param → 200400404500
GET
/v3/signer/{signer_pubkey}/{cycle_number}
Get number of blocks signed by signer during a given reward cycle
getSignerBlocksSigned 2 params → 200400404500
GET
/v2/microblocks/confirmed/{block_id}
Get stream of confirmed microblocks (Epoch 2.x)
getConfirmedMicroblocks 1 param → 200400404500
GET
/v2/microblocks/{microblock_id}
Get a stream of microblocks beginning with the given microblock (Epoch 2.x).
getMicroblockById 1 param → 200400404500
GET
/v2/microblocks/unconfirmed/{block_id}/{seq}
Get stream of unconfirmed microblocks (Epoch 2.x)
getUnconfirmedMicroblocks 2 params → 200400404500
POST
/v2/microblocks
Submit a microblock (Epoch 2.x)
postMicroblock body → 200400404500
GET
/v2/headers/{quantity}
Get recent 2.x block headers
getBlockHeaders 2 params → 200400404500
GET
/v2/blocks/{block_id}
Get Stacks 2.x block by ID
getLegacyBlockById 1 param → 200400404500
GET
/v3/tenures/fork_info/{start}/{stop}
Get tenure fork information
getTenureForkInfo 2 params → 200400404500
GET
/v3/tenures/tip/{consensus_hash}
Get tenure tip
getTenureTip 1 param → 200400404500
GET
/v3/tenures/tip_metadata/{consensus_hash}
Get tenure tip with metadata
getTenureTipMetadata 1 param → 200400404500
POST
/v3/blocks/upload
Upload a Nakamoto block
uploadNakamotoBlock 1 param body → 200400401500
GET
/v3/blocks/replay/{block_id}
Replay mining of a block and returns its content
blockReplay 1 param → 200400401404500
GET
/v3/blocks/simulate/{block_id}
Simulate mining of a block with the specified transactions and returns its content
blockSimulate 1 param body → 200400401404500

Schemas 10

The contract defines 10 schemas that model the data the API accepts and returns. Each schema is shown below with its type and property counts.

TenureInfo
TenureTipMetadata
BlockReplay
TenureForkInfo
TenureTip
Sortitions
TenureBlocks
BlockHeaders
BlockUploadResponse
SignerBlocksSigned

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

hiro-blocks-api-openapi.yml Raw ↑

Other APIs Hiro publishes across the network.

Hiro Chainhooks API
Hiro Platform API
Hiro Accounts API
Hiro Atlas API
Hiro Blocks Proposals API
Hiro Burn Blocks API
Hiro Faucets API
Hiro Fees API
Hiro Fungible Tokens API
Hiro Info API
Hiro Mempool API
Hiro Microblocks API