BNB Smart Chain
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
BNB Smart Chain
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
eth_getBlockTransactionCountByNumber answers a narrow question cheaply: how many transactions sit in the block at a given height or named tag? BNB Smart Chain finalizes new blocks about every three seconds under PoSA and pays its fees in BNB. You pass either a hex block number or a label like latest, safe, or finalized, and receive the count as a hex integer without downloading the full block body. Send the request to https://bsc.therpc.io/YOUR_API_KEY on chain ID 56 whenever you want block fullness but not the transactions themselves.
latest block and watching how its transaction count rises and falls.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | blockTag | string | Oui | The block to count transactions in. |
| Type | Description |
|---|---|
| string (hex) | Hex-encoded transaction count. |
Try it live in the BNB Smart Chain playground.
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or unrecognised. |
pending tag counts transactions the node is currently queuing for the next BSC block, so the figure can shift from one call to the next.0x9c; run it through parseInt(value, 16) before doing any numeric comparison or arithmetic.Paramètres
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"