Avalanche
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Avalanche
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
eth_getBlockTransactionCountByNumber reports how many transactions sit inside an Avalanche C-Chain block, identified by its decimal height (passed as hex) or by a tag such as latest. Because the C-Chain runs the Snowman consensus engine with roughly 1–2 second finality, block heights advance quickly, so this call is a cheap way to sample how busy the chain is without pulling the full block body. AVAX is the native gas token that pays for every transaction counted here. Send the request to https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, 0xa86a), and the node returns the transaction count for the requested block.
latest block's transaction count to gauge real-time C-Chain congestion before submitting time-sensitive swaps on Trader Joe or GMX.| # | 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 Avalanche playground.
| Code | Meldung | Ursache |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or unrecognised. |
pending tag counts transactions currently queued for the next C-Chain block; that figure can shift between two back-to-back calls as the mempool drains and refills."0x2a"), so run parseInt(value, 16) before any numeric comparison or arithmetic.Parameter
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"