Get block header information
cURL
curl --request GET \ --url https://toncenter.com/api/v2/getBlockHeader
200
Example
{ "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>" } ] } }
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())
Workchain ID
Shard ID
Seqno of a block
Root hash of a block
File hash of a block
OK
true
Block header information.
Show child attributes