For the complete documentation index, see llms.txt. This page is also available as Markdown.

Blocks

Read-only endpoints to obtain Stacks block details

Get blocks

get

Retrieves a list of recently mined blocks

Query parameters
limitinteger · max: 30Optional

Results per page

Default: 20
offsetinteger · min: -300 · max: 300Optional

Result offset

Default: 0
cursorstringOptional

Cursor for block pagination

Pattern: ^0x[a-fA-F0-9]{64}$
Responses
200

Default Response

application/json
limitintegerRequiredExample: 20
offsetintegerRequiredExample: 0
totalintegerRequiredExample: 1
next_cursorstring · nullableRequired

Next page cursor

prev_cursorstring · nullableRequired

Previous page cursor

cursorstring · nullableRequired

Current page cursor

get/extended/v2/blocks/
GET /extended/v2/blocks/ HTTP/1.1
Host: api.hiro.so/
Accept: */*
{
  "limit": 20,
  "offset": 0,
  "total": 1,
  "next_cursor": "text",
  "prev_cursor": "text",
  "cursor": "text",
  "results": [
    {
      "canonical": true,
      "height": 1,
      "hash": "text",
      "block_time": 1,
      "block_time_iso": "text",
      "tenure_height": 1,
      "index_block_hash": "text",
      "parent_block_hash": "text",
      "parent_index_block_hash": "text",
      "burn_block_time": 1,
      "burn_block_time_iso": "text",
      "burn_block_hash": "text",
      "burn_block_height": 1,
      "miner_txid": "text",
      "tx_count": 1,
      "execution_cost_read_count": 1,
      "execution_cost_read_length": 1,
      "execution_cost_runtime": 1,
      "execution_cost_write_count": 1,
      "execution_cost_write_length": 1
    }
  ]
}

Get average block times

get

Retrieves average block times (in seconds)

Responses
200

Default Response

application/json
last_1hnumberRequired

Average block times over the last hour (in seconds)

last_24hnumberRequired

Average block times over the last 24 hours (in seconds)

last_7dnumberRequired

Average block times over the last 7 days (in seconds)

last_30dnumberRequired

Average block times over the last 30 days (in seconds)

get/extended/v2/blocks/average-times
GET /extended/v2/blocks/average-times HTTP/1.1
Host: api.hiro.so/
Accept: */*
{
  "last_1h": 1,
  "last_24h": 1,
  "last_7d": 1,
  "last_30d": 1
}

Get block by block time

get

Retrieves the most recent block mined at or before a given Unix timestamp (in seconds)

Path parameters
timestampintegerRequired

Unix timestamp (in seconds)

Example: 1677731361
Responses
200

Default Response

application/json
canonicalbooleanRequired

Set to true if block corresponds to the canonical chain tip

heightintegerRequired

Height of the block

hashstringRequired

Hash representing the block

block_timeintegerRequired

Unix timestamp (in seconds) indicating when this block was mined.

block_time_isostringRequired

An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.

tenure_heightintegerRequired

The tenure height (AKA coinbase height) of this block

index_block_hashstringRequired

The only hash that can uniquely identify an anchored block or an unconfirmed state trie

parent_block_hashstringRequired

Hash of the parent block

parent_index_block_hashstringRequired

Index block hash of the parent block

burn_block_timeintegerRequired

Unix timestamp (in seconds) indicating when this block was mined.

burn_block_time_isostringRequired

An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.

burn_block_hashstringRequired

Hash of the anchor chain block

burn_block_heightintegerRequired

Height of the anchor chain block

miner_txidstringRequired

Anchor chain transaction ID

tx_countintegerRequired

Number of transactions included in the block

execution_cost_read_countintegerRequired

Execution cost read count.

execution_cost_read_lengthintegerRequired

Execution cost read length.

execution_cost_runtimeintegerRequired

Execution cost runtime.

execution_cost_write_countintegerRequired

Execution cost write count.

execution_cost_write_lengthintegerRequired

Execution cost write length.

get/extended/v2/blocks/by-block-time/{timestamp}
GET /extended/v2/blocks/by-block-time/{timestamp} HTTP/1.1
Host: api.hiro.so/
Accept: */*
{
  "canonical": true,
  "height": 1,
  "hash": "text",
  "block_time": 1,
  "block_time_iso": "text",
  "tenure_height": 1,
  "index_block_hash": "text",
  "parent_block_hash": "text",
  "parent_index_block_hash": "text",
  "burn_block_time": 1,
  "burn_block_time_iso": "text",
  "burn_block_hash": "text",
  "burn_block_height": 1,
  "miner_txid": "text",
  "tx_count": 1,
  "execution_cost_read_count": 1,
  "execution_cost_read_length": 1,
  "execution_cost_runtime": 1,
  "execution_cost_write_count": 1,
  "execution_cost_write_length": 1
}

Get block

get

Retrieves a single block

Path parameters
height_or_hashany ofRequired
string · enumOptionalPossible values:
or
stringOptional

Block hash

Example: daf79950c5e8bb0c620751333967cdd62297137cdaf79950c5e8bb0c62075133Pattern: ^(0x)?[a-fA-F0-9]{64}$
or
integerOptional

Block height

Example: 777678
Responses
200

Default Response

application/json
canonicalbooleanRequired

Set to true if block corresponds to the canonical chain tip

heightintegerRequired

Height of the block

hashstringRequired

Hash representing the block

block_timeintegerRequired

Unix timestamp (in seconds) indicating when this block was mined.

block_time_isostringRequired

An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.

tenure_heightintegerRequired

The tenure height (AKA coinbase height) of this block

index_block_hashstringRequired

The only hash that can uniquely identify an anchored block or an unconfirmed state trie

parent_block_hashstringRequired

Hash of the parent block

parent_index_block_hashstringRequired

Index block hash of the parent block

burn_block_timeintegerRequired

Unix timestamp (in seconds) indicating when this block was mined.

burn_block_time_isostringRequired

An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.

burn_block_hashstringRequired

Hash of the anchor chain block

burn_block_heightintegerRequired

Height of the anchor chain block

miner_txidstringRequired

Anchor chain transaction ID

tx_countintegerRequired

Number of transactions included in the block

execution_cost_read_countintegerRequired

Execution cost read count.

execution_cost_read_lengthintegerRequired

Execution cost read length.

execution_cost_runtimeintegerRequired

Execution cost runtime.

execution_cost_write_countintegerRequired

Execution cost write count.

execution_cost_write_lengthintegerRequired

Execution cost write length.

get/extended/v2/blocks/{height_or_hash}
GET /extended/v2/blocks/{height_or_hash} HTTP/1.1
Host: api.hiro.so/
Accept: */*
{
  "canonical": true,
  "height": 1,
  "hash": "text",
  "block_time": 1,
  "block_time_iso": "text",
  "tenure_height": 1,
  "index_block_hash": "text",
  "parent_block_hash": "text",
  "parent_index_block_hash": "text",
  "burn_block_time": 1,
  "burn_block_time_iso": "text",
  "burn_block_hash": "text",
  "burn_block_height": 1,
  "miner_txid": "text",
  "tx_count": 1,
  "execution_cost_read_count": 1,
  "execution_cost_read_length": 1,
  "execution_cost_runtime": 1,
  "execution_cost_write_count": 1,
  "execution_cost_write_length": 1
}

Get signer signatures for block

get

Retrieves the signer signatures (an array of signature byte strings) in a single block

Path parameters
height_or_hashany ofRequired
string · enumOptionalPossible values:
or
stringOptional

Block hash

Example: daf79950c5e8bb0c620751333967cdd62297137cdaf79950c5e8bb0c62075133Pattern: ^(0x)?[a-fA-F0-9]{64}$
or
integerOptional

Block height

Example: 777678
Query parameters
limitinteger · max: 1000Optional

Results per page

Default: 500
offsetintegerOptional

Result offset

Default: 0
Responses
200

Default Response

application/json
limitintegerRequiredExample: 20
offsetintegerRequiredExample: 0
totalintegerRequiredExample: 1
resultsstring[]Required

Array of hex strings representing the block's signer signature

get/extended/v2/blocks/{height_or_hash}/signer-signatures
GET /extended/v2/blocks/{height_or_hash}/signer-signatures HTTP/1.1
Host: api.hiro.so/
Accept: */*
{
  "limit": 20,
  "offset": 0,
  "total": 1,
  "results": [
    "text"
  ]
}

Get blocks by tenure

get

Retrieves blocks confirmed in a block tenure

Path parameters
tenure_heightintegerRequired

Block tenure height

Example: 165453
Query parameters
limitinteger · max: 30Optional

Results per page

Default: 20
offsetinteger · min: -300 · max: 300Optional

Result offset

Default: 0
cursorstringOptional

Cursor for block pagination

Pattern: ^0x[a-fA-F0-9]{64}$
Responses
200

Default Response

application/json
limitintegerRequiredExample: 20
offsetintegerRequiredExample: 0
totalintegerRequiredExample: 1
next_cursorstring · nullableRequired

Next page cursor

prev_cursorstring · nullableRequired

Previous page cursor

cursorstring · nullableRequired

Current page cursor

get/extended/v2/block-tenures/{tenure_height}/blocks
GET /extended/v2/block-tenures/{tenure_height}/blocks HTTP/1.1
Host: api.hiro.so/
Accept: */*
{
  "limit": 20,
  "offset": 0,
  "total": 1,
  "next_cursor": "text",
  "prev_cursor": "text",
  "cursor": "text",
  "results": [
    {
      "canonical": true,
      "height": 1,
      "hash": "text",
      "block_time": 1,
      "block_time_iso": "text",
      "tenure_height": 1,
      "index_block_hash": "text",
      "parent_block_hash": "text",
      "parent_index_block_hash": "text",
      "burn_block_time": 1,
      "burn_block_time_iso": "text",
      "burn_block_hash": "text",
      "burn_block_height": 1,
      "miner_txid": "text",
      "tx_count": 1,
      "execution_cost_read_count": 1,
      "execution_cost_read_length": 1,
      "execution_cost_runtime": 1,
      "execution_cost_write_count": 1,
      "execution_cost_write_length": 1
    }
  ]
}

Last updated

Was this helpful?