getBlockHeader - Ton

getBlockHeader. Retrieves the header information for a specified block, including metadata such as the block's ID, timestamp, and previous block reference.

getBlockHeader - ton [Value: 100CU]
Retrieves the header information for a specified block, including metadata such as the block's ID, timestamp, and previous block reference.
Use cases

Use cases

  • Retrieve the header of a specific block
  • Access metadata about block properties
  • Verify block information for audits
Constraints

Constraints

  • Requires a valid block ID or number
  • Only provides headers for existing blocks
  • Dependent on node synchronization
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl --request GET \
     --url  'https://ton.drpc.org/rest/getBlockHeader?workchain=0&shard=-9223372036854775808&seqno=1000000' \
     --header 'accept: application/json'
Copy
Response
200
{
    "id": "0:1c23f2f29e4b4ef09e10c5a3eec7f6c0c95bc8b1cdca9d2b7e10fdb0eb872130",
    "workchain": 0,
    "shard": -9223372036854775808,
    "seqno": 1000000,
    "proof": {
        "block_id": "0:1c23f2f29e4b4ef09e10c5a3eec7f6c0c95bc8b1cdca9d2b7e10fdb0eb872130",
        "prev_block_id": "0:af0c98a1d5098bbff3f9d8c40e46f59315e0c3f51e2377c888899e94e97b8c2",
        "shard_state": {
            "last_seqno": 999999,
            "root_hash": "e0c53bb6f6e4f8e4506f00b6e940f8c58cbd0843b7f67f290f99c2c2e303aef",
            "state_hash": "b21dfd4091fcb42c7bcf0b21c885ff704dc78b5929af6de249dc58b2c8f144e"
        },
        "transactions": [
            {
                "id": "trans1_id",
                "status": "confirmed",
                "value": "2500",
                "to": "0:abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234",
                "from": "0:efgh5678efgh5678efgh5678efgh5678efgh5678efgh5678efgh5678efgh5678",
                "created_at": 1693527600
            },
            {
                "id": "trans2_id",
                "status": "pending",
                "value": "7500",
                "to": "0:ijkl9012ijkl9012ijkl9012ijkl9012ijkl9012ijkl9012ijkl9012ijkl9012",
                "from": "0:mnop3456mnop3456mnop3456mnop3456mnop3456mnop3456mnop3456mnop3456",
                "created_at": 1693527700
            }
        ]
    },
    "status": "success"
}
Copy

Request params

Parametersobject
object
workchaininteger
Represents the workchain ID; 0 denotes the masterchain (TON's main chain).
shardinteger
Denotes the shard ID; -9223372036854775808 represents the leftmost shard.
seqnointeger
The sequence number of the block.

Response

200

Response params

object
idstring
Unique identifier of the block.
workchaininteger
ID of the workchain; 0 represents the masterchain.
shardinteger
ID of the shard, represented as a signed integer.
seqnointeger
Sequence number of the block.
proofobject
Contains proof information related to the block.
object
block_idstring
ID of the block being referenced.
prev_block_idstring
ID of the previous block.
shard_stateobject
State of the shard at the time of the block.
object
last_seqnointeger
The last sequence number for this shard.
root_hashstring
Root hash of the shard state.
state_hashstring
Hash representing the state of the shard.
transactionsarray
Array of transactions included in the block.
object
idstring
Unique identifier of the transaction.
statusstring
Current status of the transaction (e.g., confirmed, pending).
valuestring
Amount/value involved in the transaction.
tostring
Recipient address of the transaction.
fromstring
Sender address of the transaction.
created_atinteger
Unix timestamp of when the transaction was created.
statusstring
Indicates the status of the response.