Skip to main content
Defined in the Ethereum JSON-RPC Specification
Returns information about a transaction by block number and transaction index position.

Parameters

string
required
Integer block number, or the string “latest”, “earliest” or “pending”.
string
required
Integer of the transaction index position as a hexadecimal string.

Returns

object
A transaction object, or null when no transaction was found.

Error Handling

Transaction indices start at 0x0 for the first transaction in a block. If the index exceeds the number of transactions, null is returned.