Get blocks
Retrieves a list of recently mined blocks.
GET
/extended/v2/blocks
Retrieves a list of recently mined blocks. If you need to actively monitor new blocks, we highly recommend using the @stacks/blockchain-api-client
library for real-time updates.
Query parameters
limit
integer
Max number of blocks to fetch
Example:20
offset
integer
Index of first burn block to fetch
Example:0
Status code | Description |
---|---|
200 | List of blocks |
curl -X GET "https://api.mainnet.hiro.so/extended/v2/blocks"
GET request that returns blocks
{
"limit": 30,
"offset": 0,
"total": 0,
"results": [
{
"canonical": true,
"height": 0,
"hash": "string",
"block_time": 0,
"block_time_iso": "string",
"index_block_hash": "string",
"parent_block_hash": "string",
"parent_index_block_hash": "string",
"burn_block_time": 0,
"burn_block_time_iso": "string",
"burn_block_hash": "string",
"burn_block_height": 0,
"miner_txid": "string",
"tx_count": 0,
"execution_cost_read_count": 0,
"execution_cost_read_length": 0,
"execution_cost_runtime": 0,
"execution_cost_write_count": 0,
"execution_cost_write_length": 0
}
]
}