Polygon
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Polygon
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
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.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | blockTag | string | 是 | The block containing the transaction. |
| 2 | transactionIndex | string (hex) | 是 | Zero-based position of the transaction within the block. |
| 类型 | 描述 |
|---|---|
| object | null | Same transaction object as eth_getTransactionByHash. Returns null if block or index not found. |
Try it live in the Polygon playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-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.参数
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0" for the first transaction)