Skip to main content

GetBlock

POST

Query block header information or entire block information according to block height or 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
id_or_numstring
Block height or hash. If omitted, the latest block is queried. Example: 1000000
detailboolean
Whether to query the full block information. Set to true to query the entire block details; set to false to query only the block header. (Default: false)
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.
timestampinteger
Timestamp. (Unit: millisecond)
txTrieRootstring
Root hash of the transaction Merkle tree.
parentHashstring
Hash of the parent block.
numberinteger
Block number (height).
witness_idinteger
ID of the Super Representative.
witness_addressstring
Address of the Super Representative that produced the block.
versioninteger
Protocol version number.
accountStateRootstring
Root hash of the account state tree.
witness_signaturestring
Signature of the Super Representative.
transactionsarray
List of transaction objects in the block. See GetTransactionById for contents in each transaction.
cURL
curl -X POST 'https://tron-mainnet.nodit.io/walletsolidity/getblock' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"id_or_num": "1000000"
}'