Base
Ready to call this in production?
Free tier covers personal projects. Pay-as-you-go scales without a card.
Base
Free tier covers personal projects. Pay-as-you-go scales without a card.
eth_getTransactionByBlockNumberAndIndex returns one transaction from a Base block, located by the block's number (or a tag like latest, safe, or finalized) and the transaction's zero-based index within it. It is the number-based sibling of eth_getTransactionByBlockHashAndIndex, handy when you scan the chain by height rather than by hash. Base is Coinbase's OP Stack optimistic rollup that settles to Ethereum L1 and meters gas in ETH, with the sequencer sealing a block about every 2 seconds. Send the call to https://base.therpc.io/YOUR_API_KEY (chain ID 8453, hex 0x2105) with a block tag and a hex index; you get the transaction object, or null if the block or index is out of range.
0x0) of each block to study sequencer ordering and MEV patterns.pending tag, where node support allows it.| # | 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 Base playground.
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or transaction index is not a valid hex integer. |
"0x0" for the first transaction, never the integer 0.pending tag is not uniform — transaction ordering and even availability under it differ between node clients, so do not build hard guarantees on the pending view of a Base block.Parameters
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0" for the first transaction)