POSTeth_getTransactionByBlockHashAndIndex

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

Returns transaction information by block hash and transaction index.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsoneOf[]required

It contains following parameters in order:

  1. blockHash: The hash of the block. (required)
  2. index: The transaction index within the block, in hexadecimal. (required)
params[0]string

The 32-byte hash of the block to look up.

params[1]string

The 32-byte hash of the block to look up.

Responses
hashstring

The transaction hash.

blockHashstring

The hash of the block containing the transaction.

blockNumberstring

The number of the block containing the transaction.

transactionIndexstring

The transaction index within the block.

fromstring

The address of the account that sent the transaction.

tostring

The address of the account or contract that received the transaction.

valuestring

The amount of TRX transferred, in sun, hex-encoded.

gasstring

The fee limit set on the transaction. TRON may return 0x0.

gasPricestring

The energy price, in sun.

inputstring

The contract call data. For a plain transfer it is 0x.

noncestring

The transaction nonce. The TRON protocol has no concept of an Ethereum account nonce, so it is always returned as a fixed 0x0.

typestring

The transaction type. TRON returns 0x0.

vstring

The recovery identifier of the signature.

rstring

The r value of the signature.

sstring

The s value of the signature.

X-API-KEY
RequestCU15
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_getTransactionByBlockHashAndIndex",
  "params": [
    "0x00000000020ef11c87517739090601aa0a7be1de6faebf35ddb14e7ab7d1cc5b",
    "0x0"
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "hash": "0xc9af231ad59bcd7e8dcf827afd45020a02112704dce74ec5f72cb090aa07eef0",
    "blockHash": "0x00000000020ef11c87517739090601aa0a7be1de6faebf35ddb14e7ab7d1cc5b",
    "blockNumber": "0x20ef11c",
    "transactionIndex": "0x6",
    "from": "0x6eced5214d62c3bc9eaa742e2f86d5c516785e14",
    "to": "0x0697250b9d73b460a9d2bbfd8c4cacebb05dd1f1",
    "value": "0x1cb2310",
    "gas": "0x0",
    "gasPrice": "0x8c",
    "input": "0x",
    "nonce": "0x0",
    "type": "0x0",
    "v": "0x1b",
    "r": "0x433eaf0a7df3a08c8828a2180987146d39d44de4ac327c4447d0eeda42230ea8",
    "s": "0x6f91f63b37f4d1cd9342f570205beefaa5b5ba18d616fec643107f8c1ae1339d"
  }
}