Avalanche
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Avalanche
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
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.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | blockTag | string | Sí | The block containing the transaction. |
| 2 | transactionIndex | string (hex) | Sí | Zero-based position of the transaction within the block. |
| Tipo | Descripción |
|---|---|
| object | null | Same transaction object as eth_getTransactionByHash. Returns null if block or index not found. |
Try it live in the Avalanche playground.
| Código | Mensaje | Causa |
|---|---|---|
-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.Parámetros
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0" for the first transaction)