Skip to main content
Returns information about a transaction given a block number and the transaction’s index position within that block.

Parameters

block
string
required
Block number in hex, or "latest", "pending", "safe", "finalized", "earliest".
index
string
required
The transaction index position as a hexadecimal integer.

Returns

result
object | null
A transaction object, or null if not found. See eth_getTransactionByHash for the full field list.

Example

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