Polygon
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Polygon
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
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.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | blockTag | string | نعم | The block to count transactions in. |
| النوع | الوصف |
|---|---|
| string (hex) | Hex-encoded transaction count. |
Try it live in the Polygon playground.
| الكود | الرسالة | السبب |
|---|---|---|
-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.المعاملات
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"