Skip to main content
GET
/
api
/
v2
/
getBlockHeader
Get Block Header
curl --request GET \
  --url https://toncenter.com/api/v2/getBlockHeader
{
  "ok": true,
  "result": {
    "@type": "blocks.header",
    "id": {
      "@type": "ton.blockIdExt",
      "workchain": 123,
      "shard": "<string>",
      "seqno": 123,
      "root_hash": "<string>",
      "file_hash": "<string>"
    },
    "global_id": 123,
    "version": 123,
    "after_merge": true,
    "after_split": true,
    "before_split": true,
    "want_merge": true,
    "want_split": true,
    "validator_list_hash_short": 123,
    "catchain_seqno": 123,
    "min_ref_mc_seqno": 123,
    "is_key_block": true,
    "prev_key_block_seqno": 123,
    "start_lt": "<string>",
    "end_lt": "<string>",
    "gen_utime": 123,
    "prev_blocks": [
      {
        "@type": "ton.blockIdExt",
        "workchain": 123,
        "shard": "<string>",
        "seqno": 123,
        "root_hash": "<string>",
        "file_hash": "<string>"
      }
    ]
  }
}

SDK Usage

import asyncio

from toncenter.rest import ToncenterRestClient
from toncenter.types import Network

WORKCHAIN = 0
SHARD = "-9223372036854775808"
SEQNO = 49560770


async def main() -> None:
    async with ToncenterRestClient(network=Network.MAINNET) as client:
        result = await client.v2.blocks.get_block_header(
            WORKCHAIN,
            SHARD,
            SEQNO,
        )
        print(result.model_dump_json(indent=4))


if __name__ == "__main__":
    asyncio.run(main())

Query Parameters

workchain
integer<int32>
required

Workchain ID

shard
string
required

Shard ID

seqno
integer<int32>
required

Seqno of a block

root_hash
string

Root hash of a block

file_hash
string

File hash of a block

Response

OK

ok
boolean
required
Example:

true

result
BlockHeader · object
required

Block header information.