Polygon
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Polygon
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
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.| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | blockTag | string | Ja | The block to count transactions in. |
| Typ | Beschreibung |
|---|---|
| string (hex) | Hex-encoded transaction count. |
Try it live in the Polygon playground.
| Code | Meldung | Ursache |
|---|---|---|
-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.Parameter
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"