Marketplace has launched, further enabling blockchain developers! Learn more


eth_getTransactionByBlockNumberAndIndex RPC method

The eth_getTransactionByBlockNumberAndIndex EVM method is only supported on the Avalanche C-Chain.


  1. Qunatity | Tag - Integer block number encoded as a hexadecimal, or the string 'latest', 'earliest' or 'pending', see the default block parameter.
  2. Quantity - A hex of the integer representing the position in the block.


  1. Object - Transaction Response Object , or null if no transaction is found:

    hash - The hash of the transaction

    nonce - The number of transactions made by the sender prior to this one encoded as hexadecimal.

    blockHash - The hash of the block where this transaction was in. null if pending.

    blockNumber - The block number where this transaction was in. null if pending.

    transactionIndex - Integer of the transactions index position in the block. null if pending.

    from - Address of the sender.

    to - Address of the receiver. Null when its a contract creation transaction.

    value - The value transferred in Wei, encoded as a hexadecimal.

    gasPrice - The gas price provided by the sender in Wei, encoded as a hexadecimal.

    gas - The gas provided by the sender, encoded as a hexadecimal.

    input - The data sent along with the transaction.

    v - The standardized V field of the signature.

    standardV - The standardized V field of the signature (0 or 1).

    r The R field of the signature.

    raw - The raw transaction data.

    publicKey - The public key of the signer.

    chainId - The chain id of the transaction, if any.

Code Examples:

To use the eth_getTransactionByBlockNumberAndIndex EVM method on the Avalanche C-Chain, ensure that the end of your URL includes ext/bc/C/rpc.

curl \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_getTransactionByBlockNumberAndIndex","params":["0xc5043f", "0x2"],"id":1,"jsonrpc":"2.0"}'
Ready to get started? Create a free account