lookupBlock - Ton
getBlockHeader. Blockchain using its block ID or other identifiers.
lookupBlock - ton [Value: 100CU]
Look up block by its ID or other identifiers.
Use cases
- Retrieve details of a specific block by its ID or number
- Access transaction data within a given block
- Analyze block properties for auditing purposes
Constraints
- Requires a valid block ID or number
- Only provides information for existing blocks
- Dependent on node synchronization with the TON network
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/lookupBlock?workchain=0&shard=-9223372036854775808&seqno=1000000<=1000000000&unixtime=1693527600' \
--header 'accept: application/json'
Response
200
{
"id": "block-id",
"workchain": 0,
"shard": -9223372036854775808,
"seqno": 1000000,
"lt": 1000000000,
"unixtime": 1693527600,
"prev": "previous-block-id",
"block": {
"gen_time": 1693527600,
"masterchain_id": "masterchain-id",
"data": {
"transactions": [
{
"id": "transaction-id",
"value": "1000",
"to": "recipient-address",
"from": "sender-address",
"status": "confirmed"
}
],
"message": "Block successfully retrieved."
}
},
"status": "success"
}
Request params
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.
ltinteger
Logical time associated with the block.
unixtimeinteger
The Unix timestamp of the block.
Response
200
Response params
object
idstring
Identifier of the block.
workchaininteger
The workchain ID; 0 indicates the masterchain.
shardinteger
The shard ID; -9223372036854775808 represents the leftmost shard.
seqnointeger
The sequence number of the block.
ltinteger
Logical time associated with the block.
unixtimeinteger
The Unix timestamp of the block.
prevstring
Identifier of the previous block.
blockobject
Detailed information about the block.
object
gen_timeinteger
The generation time of the block.
masterchain_idstring
Identifier of the masterchain.
dataobject
Additional data related to the block.
object
transactionsarray
List of transactions in the block.
object
idstring
Identifier of the transaction.
valuestring
Value transferred in the transaction.
tostring
Recipient address of the transaction.
fromstring
Sender address of the transaction.
statusstring
Status of the transaction (e.g., confirmed).
messagestring
Message indicating the result of the block retrieval.
statusstring
The status of the request, indicating success or failure.