eth_getTransactionByBlockNumberAndIndex
POST
Returns the transaction information for the specified block number and transaction index.
param[0]
blockNumberOrTagstringrequired
Use one of block number or block tag to specify a block.- Block number: hex string (ex. "0x1")
- Block tag: enum string (ex. "latest", "earliest", "pending")
earliest: The oldest available block on the chain.finalized: A recently finalized block that can no longer be changed. Primarily used in proof-of-stake (PoS) blockchains.safe: A recent block considered safe by the network (immune to reorgs).latest: The most recent block on the chain (may be subject to reorgs).pending: The next block to be mined, including pending transactions in the mempool.
param[1]
transactionIndexstringrequired
Transaction index indicates the position of a transaction within the block. Expressed as a hexadecimal string.Responses
blockHashstring
Hash of the block containing this transaction. Null for pending transactionsblockNumberstring
Block number containing this transaction (hex). Null for pending transactionsfromstring
Sender address of the transactiongasstring
Gas limit set for the transaction (hex)gasPricestring
Gas price (hex, in wei)maxPriorityFeePerGasstring
Maximum priority fee per gas (EIP-1559, hex)maxFeePerGasstring
Maximum fee per gas (EIP-1559, hex)hashstring
Transaction hashinputstring
Transaction input data (hex encoded)noncestring
Number of transactions sent by the sender prior to this one (hex)tostring
Recipient address. Null for contract creation transactionstransactionIndexstring
Transaction position index within the block (hex). Null for pending transactionsvaluestring
Amount of ETH transferred (hex, in wei)typestring
Transaction type (0x0=Legacy, 0x1=EIP-2930, 0x2=EIP-1559)EIP-2930 access list (type 0x1 and 0x2)
addressstring
Contract address to be accessedstorageKeysarray
Storage keys to be accessedchainIdstring
Chain ID of the network this transaction belongs to (hex)vstring
ECDSA signature v valuerstring
ECDSA signature r valuesstring
ECDSA signature s valuecodestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "ERROR_CODE","message": "Unauthorized"}
cURL
curl -X POST 'https://giwa-sepolia.nodit.io' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"jsonrpc": "2.0","id": 1,"method": "eth_getTransactionByBlockNumberAndIndex","params": ["0x1076B5A","0x0"]}'