Skip to main content
Returns transaction information for a given block number and transaction index position.

Parameters

blockParameter
string
required
Block number in hexadecimal, or a block tag: latest, earliest, pending, safe, or finalized.
transactionIndex
string
required
The transaction’s index position in the block as a hexadecimal integer.

Returns

result
object | null
A transaction object with the same fields as eth_getTransactionByHash, or null if no transaction was found at that position.

Example

{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": ["latest", "0x0"],
  "id": 1
}