Polygon
Polygon
Polygon
Free tier covers personal projects. Pay-as-you-go scales without a card.
eth_getBlockReceipts returns every transaction receipt in a Polygon PoS block in one call — status, logs, gas used, and the MATIC-denominated effectiveGasPrice for each transaction. Instead of looping eth_getTransactionReceipt over each hash, you get the whole block's receipts at once, which is the efficient way to ingest a busy Polygon block full of stablecoin and DeFi activity. Call https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89) with a block tag and you get back an array of receipt objects.
Transfer logs in a block — for example USDT (0xc2132D05D31c914a87C6611C10748AEb04B58e8F) movements — to update cached token balances.status "0x0") for error analysis and alerting.| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | blockTag | string | Yes | The block whose receipts to fetch. |
| Type | Description |
|---|---|
| array of object | Array of receipt objects. Each receipt contains: transactionHash, transactionIndex, blockHash, blockNumber, from, to, contractAddress, gasUsed, cumulativeGasUsed, effectiveGasPrice, status ("0x1" success / "0x0" failure), logs, logsBloom, type. |
Try it live in the Polygon playground.
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Block tag is unrecognised or malformed. |
-32000 | Block not found | The requested block does not exist or has been pruned. |
eth_getTransactionReceipt once per hash — always prefer it for whole-block receipt ingestion on Polygon.eth_getBlockReceipts; TheRPC's Polygon endpoint supports it, but confirm availability before depending on it across other providers.Parameters
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"