Polygon
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Polygon
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
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.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | blockTag | string | Sí | The block to count transactions in. |
| Tipo | Descripción |
|---|---|
| string (hex) | Hex-encoded transaction count. |
Try it live in the Polygon playground.
| Código | Mensaje | 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"