Arbitrum One
Ready to call this in production?
Free tier covers personal projects. Pay-as-you-go scales without a card.
Arbitrum One
Free tier covers personal projects. Pay-as-you-go scales without a card.
eth_getTransactionByBlockNumberAndIndex returns one transaction by its position inside a block, where the block is named by its number or by a tag like latest. On Arbitrum One (chain ID 42161), an Optimistic Rollup paying gas in ETH and settling to Ethereum L1, this is convenient when you are scanning forward by block height rather than tracking hashes. Send a block tag and a hex index to https://arbitrum.therpc.io/YOUR_API_KEY and it returns the transaction at that index position within the block, or null if the block or index is not found.
pending tag with a position index.| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | blockTag | string | Yes | The block containing the transaction. |
| 2 | transactionIndex | string (hex) | Yes | Zero-based position of the transaction within the block. |
| Type | Description |
|---|---|
| object | null | Same transaction object as eth_getTransactionByHash. Returns null if block or index not found. |
Try it live in the Arbitrum One playground.
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or transaction index is not a valid hex integer. |
"0x0", not the integer 0, for the first transaction.pending tag depend on the sequencer's current view; ordering and availability of pending transactions can differ between calls and node clients, so do not treat them as final.Parameters
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0" for the first transaction)