Polygon
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
Polygon
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
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.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | blockTag | string | Sim | The block to count transactions in. |
| Tipo | Descrição |
|---|---|
| string (hex) | Hex-encoded transaction count. |
Try it live in the Polygon playground.
| Código | Mensagem | Causa |
|---|---|---|
-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.Parâmetros
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"