Skip to main content

GetBlockById

POST

Query block by ID(block hash). (Confirmed state)
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.
networkstringrequired
Parameter specifying the network of the target chain.
Request Body
valuestring
Block ID (hash). Example: 00000000000f424013e51b18e0782a32fa079ddafdb2f4c343468cf8896dc887
visibleboolean
Optional. Set to true to format addresses in Base58; set to false for hex format. (Default: false)
Responses
blockIDstring
Block hash.
Block header information.
Raw data of the block header.
numberinteger
Block number (height).
txTrieRootstring
Root hash of the transaction Merkle tree.
witness_addressstring
Address of the Super Representative that produced the block.
parentHashstring
Hash of the parent block.
timestampinteger
Timestamp. (Unit: millisecond)
witness_signaturestring
Signature of the Super Representative.
cURL
curl -X POST 'https://tron-mainnet.nodit.io/walletsolidity/getblockbyid' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"value": "00000000000f424013e51b18e0782a32fa079ddafdb2f4c343468cf8896dc887"
}'