Get blocks by version
This endpoint allows you to get the transactions in a block and the corresponding block information given a version in the block.
Transactions are limited by max default transactions size. If not all transactions are present, the user will need to query for the rest of the transactions via the get transactions API.
If the block is pruned, it will return a 410.
Path Parameters:
version integer required
Ledger version to lookup block information for
Query Parameters:
with_transactions boolean
If set to true, include all transactions in the block. If not provided, no transactions will be retrieved
Response Header:
X-APTOS-BLOCK-HEIGHT integer
Current block height of the chain
X-APTOS-CHAIN-ID integer
Chain ID of the current chain
X-APTOS-EPOCH integer
Current epoch of the chain
X-APTOS-LEDGER-OLDEST-VERSION integer
Oldest non-pruned ledger version of the chain
X-APTOS-LEDGER-TIMESTAMPUSEC integer
Current timestamp of the chain
X-APTOS-LEDGER-VERSION integer
Current ledger version of the chain
X-APTOS-OLDEST-BLOCK-HEIGHT integer
Oldest non-pruned block height of the chain
Response Body:
A Block with or without transactions
block_height string<uint64>
A string containing a 64-bit unsigned integer.
block_hash string
block_timestamp string<uint64>
A string containing a 64-bit unsigned integer.
first_version string<uint64>
A string containing a 64-bit unsigned integer.
last_version string<uint64>
A string containing a 64-bit unsigned integer.
transactions array
Example:
Last updated