Polygon
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Polygon
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_getTransactionByBlockNumberAndIndex returns one transaction from Polygon PoS (chain ID 137) addressed by a block — given as a height or a tag like latest or pending — plus the zero-based index of the transaction within it. Polygon's MATIC-fee, EVM-equivalent design and ~2-second Bor blocks make this handy for sequential scanning when you are iterating by block number rather than resolving block hashes first. Point the request at https://polygon.therpc.io/YOUR_API_KEY and it returns the same transaction object as eth_getTransactionByHash, or null if the block or index is out of range.
0x0) of each Polygon block for MEV and ordering research.pending tag while Bor is still assembling it.| # | 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 Polygon playground.
| Código | Mensaje | Causa |
|---|---|---|
-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 are not stable: which transactions appear and in what order depends on the node's current Bor mempool view and can differ between clients and between calls.Parámetros
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0" for the first transaction)