Block by number or tag
getBlockFetch a blockchain block by hash, number, or tag on Ankr-supported chains and Sui, with optional decoded transactions.
Instructions
Get a block by a 0x-64 hash, a block number (decimal or 0x-hex), or a tag (latest, finalized, safe, earliest, pending).
Tier 2 drops the verbose header roots and bloom and, with includeTxs, ABI-decodes and compacts the embedded transactions. A large block with includeTxs may come back raw (hex); _meta.tier says which, and dropping includeTxs gets the header decoded.
Sui: block is a checkpoint number or digest.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| block | Yes | Block number (decimal or 0x-hex), a 0x-64 block hash, or a tag. Above 2^53 pass a STRING — a JSON number that large is not exact. | |
| chain | Yes | Chain slug as in rpc.ankr.com/<chain> — any chain Ankr serves (see listChains) | |
| includeTxs | No | Include full (decoded) transactions instead of just hashes (default false) |