Avalanche
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Avalanche
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
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.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | blockTag | string | 是 | The block to count transactions in. |
| 类型 | 描述 |
|---|---|
| string (hex) | Hex-encoded transaction count. |
Try it live in the Avalanche playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-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.参数
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"