POSTeth_getBlockByNumber

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

Fetches block information by block number.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsoneOf[]required

It contains following parameters in order:

  1. block: The block number to look up, or a tag (latest, earliest). (required)
  2. includeTransactions: Whether to also return full transaction details, as a boolean. (required)
params[0]oneOf
oneOf

The hex-encoded block number.

string

The hex-encoded block number.

params[1]boolean

When true, an array of transaction objects is returned; when false, an array of transaction hashes is returned.

Responses
numberstring

The block number, hex-encoded.

hashstring

The block hash. Its leading 8 characters encode the block height.

parentHashstring

The hash of the previous block.

transactionsRootstring

The merkle root of the transactions in the block.

stateRootstring

The state tree root. TRON does not provide this value and returns an empty value (0x).

receiptsRootstring

The receipts tree root. TRON has no counterpart, so it is filled with zeros.

minerstring

The address of the Super Representative (SR) that produced the block.

logsBloomstring

The Bloom filter used to search event logs.

sizestring

The block size in bytes, hex-encoded.

gasLimitstring

The maximum total energy allowed for the block.

gasUsedstring

The total energy consumed in the block.

timestampstring

The block creation time in UNIX epoch seconds, hex-encoded.

transactionsobject[]

The list of transactions included in the block. When the second request parameter is false, an array of transaction hashes is returned; when true, an array of transaction objects is returned.

difficultystring

The mining difficulty. TRON does not use proof of work, so it is always 0x0.

totalDifficultystring

The cumulative difficulty. TRON does not use proof of work, so it is always 0x0.

noncestring

The proof-of-work nonce. TRON has no counterpart, so it is filled with zeros.

mixHashstring

The proof-of-work mix hash. TRON has no counterpart, so it is filled with zeros.

sha3Unclesstring

The hash of the uncle list. TRON has no uncles, so it is filled with zeros.

unclesstring[]

The list of uncle blocks. TRON has no uncles, so it is always an empty array.

extraDatastring

Extra data included in the block. TRON returns an empty value (0x).

baseFeePerGasstring

The EIP-1559 base fee. TRON has no counterpart, so it is always 0x0.

X-API-KEY
RequestCU31
cURL
curl -X POST "https://tron-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x51e8875",
    false
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "number": "0x51e8875",
    "hash": "0x00000000051e8875a66517bcaa9ab35bd74bfca11d1a2018325820c26b2dc36a",
    "parentHash": "0x00000000051e8874ea6e2af70be25692b544251f9e5480b2d0e15d47e7950177",
    "transactionsRoot": "0xe16cf02e97f2c85453b3e16ebacf1d8ed40d5b531b8f5bd960051b12be35c26c",
    "stateRoot": "0x",
    "receiptsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "miner": "0xc189fa6fc9ed7a3580c3fe291915d5c6a6259be7",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000",
    "size": "0x1de6a",
    "gasLimit": "0x28cc6f708",
    "gasUsed": "0x9ad7ea",
    "timestamp": "0x6a97cb53",
    "transactions": [
      "0x56f2c50d4e4a52137d1c1a890adffbdc50d39cf9244484f4be912087a9e031fe"
    ],
    "difficulty": "0x0",
    "totalDifficulty": "0x0",
    "nonce": "0x0000000000000000",
    "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "sha3Uncles": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "uncles": [],
    "extraData": "0x",
    "baseFeePerGas": "0x0"
  }
}