GetBlockByNum
Returns the Block Object corresponding to the 'Block Height' specified (number of blocks preceding it).
This method will use 30
Compute Units.
Parameters
num
- int32 - the block height.
Returns
Block data, please refer to /wallet/getblock for the content contained in block.
// Result
{
"blockID": "00000000000000c86d2473411771f83db5e314c01bc8f8cf0dc2f8892be6fd7f",
"block_header": {
"raw_data": {
"number": 200,
"txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000",
"witness_address": "41f16412b9a17ee9408646e2a21e16478f72ed1e95",
"parentHash": "00000000000000c7d4d47132f21fd0b74e2f8bcb0c2e9130f7cab35b5d38af9f",
"version": 9,
"timestamp": 1575594618000
},
"witness_signature": "97ecda5b130600d18304e02f7fd5ab9d115c5ec9c0e312c8c6fe83939771bb85505fafee598541dc902b1a7b8ca2735c83a12e640203ed4b8529d47ce4f413df00"
}
}
curl https://mainnet.tron.validationcloud.io/v1/<YOUR_API_KEY_HERE>/wallet/getblockbynum \
-X POST \
-H "Content-Type: application/json" \
-d '{"num":200}'
Last updated
Was this helpful?