Avalanche
Avalanche
Avalanche
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getBlockByNumber returns the block data for an Avalanche C-Chain block at a given height or named tag such as latest or finalized. You get the full header — timestamp, gas usage, the AVAX-denominated base fee — plus either transaction hashes or full transaction objects. It is the height-keyed way to walk the C-Chain, and because Snowman finality lands in roughly one to two seconds, the finalized tag is rarely far behind latest. Query https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114).
latest block for a real-time Avalanche monitoring dashboard; at ~1–2s block times it refreshes quickly.finalized block to anchor queries that must be reorg-safe under Snowman consensus.includeTransactions=false) before fetching receipts in bulk.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 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 Avalanche playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Block number is malformed or block tag is unrecognised. |
includeTransactions, not the string "true" — the JSON-RPC type check will reject a quoted value.eth_getBlockReceipts over N individual eth_getTransactionReceipt calls — far fewer round trips against the C-Chain.includeTransactions=true, the response can reach 1–2 MB for a heavily loaded C-Chain block; budget bandwidth accordingly.المعاملات
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
true = full tx objects, false = tx hashes only