Polygon
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
Polygon
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
eth_getBlockTransactionCountByNumber returns how many transactions a block on Polygon PoS (chain ID 137) holds, selected by block height or a tag such as latest. On a network where MATIC pays for gas, ~2-second Bor blocks and high QuickSwap and stablecoin throughput mean block occupancy swings constantly, so this call is a lightweight way to gauge how busy a given block was without downloading the full block body. Send it to https://polygon.therpc.io/YOUR_API_KEY and you get back a single hex-encoded count of the transactions included at the requested height.
latest block's transaction count to watch real-time congestion on Polygon — useful during high-volume events such as Polymarket settlements or USDC liquidity moves.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | blockTag | string | Oui | The block to count transactions in. |
| Type | Description |
|---|---|
| string (hex) | Hex-encoded transaction count. |
Try it live in the Polygon playground.
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or unrecognised. |
pending tag counts transactions currently queued in the Bor mempool for the next block; that set churns quickly on Polygon, so two back-to-back calls can return different counts."0x9c", not a number — run parseInt(value, 16) before any numeric comparison or arithmetic.Paramètres
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"