BNB Smart Chain
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
BNB Smart Chain
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getBlockByNumber retrieves a BNB Smart Chain block by its height or by a named tag like latest or finalized, returning the same structure as a hash lookup. BSC is a geth-equivalent EVM fueled by BNB that adds a PoSA block roughly every three seconds, which makes height-by-height retrieval the natural way to walk the chain in order. Direct the request to https://bsc.therpc.io/YOUR_API_KEY (chain ID 56). Back comes that block (header, gas figures, transaction list), or null when the height has not yet been produced.
latest block to feed a real-time monitoring or analytics dashboard.finalized tag to anchor work that must survive any reorg under PoSA finality.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | blockTag | string | نعم | The block to retrieve. |
| 2 | includeTransactions | boolean | نعم | When true, transactions[] contains full transaction objects. When false, only hashes. |
| النوع | الوصف |
|---|---|
| object | null | Same block object as eth_getBlockByHash. Returns null if the block does not exist. |
Try it live in the BNB Smart Chain playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Block number is malformed or block tag is unrecognised. |
includeTransactions as a genuine boolean; the quoted string "true" is invalid and the node will reject it.eth_getBlockReceipts call beats firing N separate eth_getTransactionReceipt requests.المعاملات
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
true = full tx objects, false = tx hashes only