/walletsolidity/gettransactioninfobyblocknum - Tron

This endpoint returns the execution results of all transactions in a confirmed block, identified by height. It is used to read every receipt and log in a block at once.

This is a Solidity-node endpoint. It returns only confirmed, irreversible data, so it is the correct interface for balance and payment verification. The Fullnode serves the same operation at https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/wallet/gettransactioninfobyblocknum over the latest, possibly unconfirmed state.

Parameters

ParameterTypeRequiredDescription
numintegerYesThe block height

Request

bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/walletsolidity/gettransactioninfobyblocknum' \
--header 'Content-Type: application/json' \
--data-raw '{
  "num": 68000000
}'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/walletsolidity/gettransactioninfobyblocknum',
    {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({"num": 68000000})
    }
);
console.log(await response.json());

example.py

pythonimport requests

response = requests.post(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/walletsolidity/gettransactioninfobyblocknum',
    headers={'Content-Type': 'application/json'},
    json={"num": 68000000}
)

print(response.json())

Response

json[
  {
    "id": "d5ec749ecc2a615399d8a6c864ea4c74ff9f523c2be0e341ac9be5d47d7c2d62",
    "blockNumber": 68000000,
    "blockTimeStamp": 1719400000000,
    "receipt": {
      "energy_usage_total": 65000,
      "net_usage": 345,
      "result": "SUCCESS"
    },
    "fee": 27000,
    "log": [
      {
        "address": "a614f803b6fd780986a42c78ec9c7f77e6ded13c",
        "topics": [
          "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
        ],
        "data": "00000000000000000000000000000000000000000000000000000000000f4240"
      }
    ]
  }
]

Response Parameters

FieldTypeDescription
idstringTransaction id
blockNumberintegerBlock height
receiptobjectEnergy and Bandwidth used, and the execution result
logarraySmart-contract event logs emitted in the block

Use Cases

  • Block Receipts: Read every confirmed receipt in a block in one call
  • TRC-20 Indexing: Extract all token Transfer logs for a block
  • Settlement Reconciliation: Confirm outcomes of a whole confirmed block
  • Analytics: Aggregate energy and fees across a block

Error Handling

HTTP StatusMessageDescription
200OKThe request succeeded; some TRON errors are returned in the 200 body as an Error field
400Bad requestThe request body is malformed or a required field is missing
500Internal errorThe node failed to process the request