POSTGetBlock

Tron Mainnethttps://tron-mainnet.nodit.io/wallet/getblock

Query block header information or entire block information according to block height or block hash

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.

raw_dataobject
timestampinteger (int64)

Timestamp. (Unit: millisecond)

txTrieRootstring

Root hash of the transaction Merkle tree.

parentHashstring

Hash of the parent block.

numberinteger (int64)

Block number (height).

witness_idinteger (int64)

ID of the Super Representative.

witness_addressstring

Address of the Super Representative that produced the block.

versioninteger (int32)

Protocol version number.

accountStateRootstring

Root hash of the account state tree.

witness_signaturestring

Signature of the Super Representative.

X-API-KEY
RequestCU30
cURL
curl -X POST "https://tron-mainnet.nodit.io/wallet/getblock" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id_or_num": "86720418",
  "detail": false
}'
Response
Example · 200
{
  "blockID": "string",
  "block_header": {
    "raw_data": {
      "timestamp": 0,
      "txTrieRoot": "string",
      "parentHash": "string",
      "number": 0,
      "witness_id": 0,
      "witness_address": "string",
      "version": 0,
      "accountStateRoot": "string"
    },
    "witness_signature": "string"
  },
  "transactions": [
    {}
  ]
}