curl --request GET \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v3/blocks{
"blocks": [
{
"seqno": 123,
"shard": "<string>",
"workchain": 123,
"fileHash": "<string>",
"rootHash": "<string>",
"timestamp": 123
}
]
}Retrieves a list of blocks from the TON blockchain
curl --request GET \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v3/blocks{
"blocks": [
{
"seqno": 123,
"shard": "<string>",
"workchain": 123,
"fileHash": "<string>",
"rootHash": "<string>",
"timestamp": 123
}
]
}blocks endpoint retrieves a list of blocks from the TON blockchain. This endpoint allows you to fetch multiple blocks at once, with options for pagination and sorting.
limit (integer, optional) — The maximum number of blocks to return. Default: 128.offset (integer, optional) — The number of blocks to skip before starting to return results. Default: 0.sort (string, optional) — The sorting order of the blocks. Possible values: “asc” (ascending) or “desc” (descending). Default: “desc”.blocks. Each block in the array has the following properties:
seqno (integer) — The sequence number of the block.shard (string) — The shard identifier of the block.workchain (integer) — The workchain ID of the block.fileHash (string) — The file hash of the block.rootHash (string) — The root hash of the block.timestamp (integer) — The timestamp of the block.blocks endpoint is essential for applications that need to analyze or display information about multiple blocks in the TON blockchain. Some common use cases include:
blocks endpoint supports pagination through the limit and offset parameters. This allows you to retrieve blocks in manageable chunks and implement features like “load more” or paginated views in your application.
The sort parameter allows you to control the order in which blocks are returned. Setting it to “desc” (the default) will return the most recent blocks first, which is useful for displaying the latest blockchain activity. Setting it to “asc” will return older blocks first, which can be helpful for historical analysis or synchronization purposes.The maximum number of blocks to return
The number of blocks to skip before starting to return results
The sorting order of the blocks
asc, desc Successful response
Show child attributes
The sequence number of the block
The shard identifier of the block
The workchain ID of the block
The file hash of the block
The root hash of the block
The timestamp of the block
Was this page helpful?