Avalanche
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
Avalanche
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
eth_getTransactionByBlockNumberAndIndex returns a single transaction by its position inside an Avalanche C-Chain block, where the block is named by a height (hex) or a tag like latest or pending, and the transaction by its zero-based index. The payload is the same transaction object as eth_getTransactionByHash — sender, recipient, AVAX value, gas fields, input — but addressed by block-and-position rather than by hash. With the C-Chain producing blocks every 1–2 seconds under Snowman consensus, this is handy for sequential height-based scans. Send the request to https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, 0xa86a).
pending tag to peek at queued mempool transactions.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | blockTag | string | Oui | The block containing the transaction. |
| 2 | transactionIndex | string (hex) | Oui | 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 Avalanche 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, not the integer 0.pending tag's behavior (which transactions appear and in what order) depends on the node client, so treat pending results as a best-effort snapshot, not a settled C-Chain block.Paramètres
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0" for the first transaction)