GETGet block header

TON Mainnethttps://ton-mainnet.nodit.io/api/v2/getBlockHeader
CU20

Returns block metadata without the full transaction list. Includes timestamps, validator info, and references to previous blocks. Intended for block explorers and other use cases that require block information without transactions.

Query Parameters
workchaininteger (int32)required

The workchain to query. Use -1 for masterchain (validators, system contracts, config) or 0 for basechain (regular accounts and contracts). Most user transactions happen on workchain 0.

shardstringrequired

The shard identifier. Masterchain always uses -9223372036854775808. For basechain, shards split and merge dynamically. Use the shards endpoint to discover current shard configuration.

seqnointeger (int32)required

Block sequence number within the specified workchain and shard.

root_hashstring

The block's root hash. Together with file_hash, uniquely identifies a block.

file_hashstring

The block's file hash. Together with root_hash, uniquely identifies a block.

Responses
okbooleanrequired

Returns true if the request succeeded; otherwise false. See the error field for details.

@typestring (enum)required

TonLib type identifier for block header objects. Refer to the TonLib type reference for a full list.

idobjectrequired

Full block identifier including workchain, shard, seqno, and hashes.

@typestring (enum)required

TonLib type identifier for full block identifiers. Refer to the TonLib type reference for a full list.

workchainintegerrequired

Workchain ID: -1 for masterchain, 0 for basechain.

shardstringrequired

Shard identifier as a signed 64-bit integer string. Masterchain uses -9223372036854775808.

seqnointegerrequired

Block sequence number within its workchain and shard. For the masterchain (workchain -1), this equals the global block height. For basechain shards (workchain 0), this is the sequence number local to that specific shard, not a global height.

root_hashstringrequired

The block's root hash. Together with file_hash, uniquely identifies a block.

file_hashstringrequired

Hash of the serialized block file. Together with root_hash, uniquely identifies a block.

global_idintegerrequired

Global network ID (-239 for mainnet, -3 for testnet).

versionintegerrequired

Block format version number.

after_mergebooleanrequired

Returns true if this block was created immediately after a shard merge; otherwise false.

after_splitbooleanrequired

Returns true if this block was created immediately after a shard split; otherwise false.

before_splitbooleanrequired

Returns true if this shard will split after this block; otherwise false.

want_mergebooleanrequired

Returns true if validators have signaled a preference to merge this shard; otherwise false.

want_splitbooleanrequired

Returns true if validators have signaled a preference to split this shard; otherwise false.

validator_list_hash_shortintegerrequired

Short hash of the validator set active during this block.

catchain_seqnointegerrequired

Catchain sequence number used for validator consensus.

min_ref_mc_seqnointegerrequired

Minimum masterchain block seqno referenced by this block.

is_key_blockbooleanrequired

Returns true if this is a key block containing validator set changes or config updates; otherwise false.

prev_key_block_seqnointegerrequired

Sequence number of the previous key block.

start_ltstringrequired

Logical time at the start of this block.

end_ltstringrequired

Logical time at the end of this block. All transactions in this block have lt between start_lt and end_lt.

gen_utimeintegerrequired

Unix timestamp when this block was generated.

prev_blocksobject[]required

Array of previous block identifiers (workchain, shard, seqno, root_hash, file_hash). Usually contains one entry, but two after a shard merge.

@typestring (enum)required

TonLib type identifier for full block identifiers. Refer to the TonLib type reference for a full list.

workchainintegerrequired

Workchain ID: -1 for masterchain, 0 for basechain.

shardstringrequired

Shard identifier as a signed 64-bit integer string. Masterchain uses -9223372036854775808.

seqnointegerrequired

Block sequence number within its workchain and shard. For the masterchain (workchain -1), this equals the global block height. For basechain shards (workchain 0), this is the sequence number local to that specific shard, not a global height.

root_hashstringrequired

The block's root hash. Together with file_hash, uniquely identifies a block.

file_hashstringrequired

Hash of the serialized block file. Together with root_hash, uniquely identifies a block.

@extrastring

Optional request ID that can be passed in the request and received back in the response. Useful for matching async responses.

X-API-KEY
Request
cURL
curl -X GET "https://ton-mainnet.nodit.io/api/v2/getBlockHeader?workchain=-1&shard=-9223372036854775808&seqno=107892772" \
  -H "X-API-KEY: {YOUR_API_KEY}"
Response
Example · 200
{
  "ok": true,
  "result": {
    "@type": "blocks.header",
    "id": {
      "@type": "ton.blockIdExt",
      "workchain": -1,
      "shard": "-9223372036854775808",
      "seqno": 107892772,
      "root_hash": "CZ71j2Ea/GLWj3Nc4qYFjHwU5WKnoR6a8OucP1StF/s=",
      "file_hash": "EgSbEso6FAMwFTf3B3yI1KeEu6cu2JNiwr/yWJWlKgc="
    },
    "global_id": -239,
    "version": 0,
    "after_merge": false,
    "after_split": false,
    "before_split": false,
    "want_merge": true,
    "want_split": false,
    "validator_list_hash_short": 1934141625,
    "catchain_seqno": 886372,
    "min_ref_mc_seqno": 107892768,
    "is_key_block": false,
    "prev_key_block_seqno": 107801649,
    "start_lt": "119175322000000",
    "end_lt": "119175322000004",
    "gen_utime": 1795684335,
    "prev_blocks": [
      {
        "@type": "ton.blockIdExt",
        "workchain": -1,
        "shard": "-9223372036854775808",
        "seqno": 107892771,
        "root_hash": "rTn6htsbqrGaJjBXM/zTx7m369P/GylmuD1DjFZA2sU=",
        "file_hash": "K2kDoQZMjZaBgJInDWm41Xz94SQtbFIABmIBOgGta+M="
      }
    ]
  },
  "@extra": "1795684350:_:0.004:c"
}