Retrieves a list of blocks from the TON blockchain
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
The response is of type object
.