Avalanche
Ready to call this in production?
Free tier covers personal projects. Pay-as-you-go scales without a card.
Avalanche
Free tier covers personal projects. Pay-as-you-go scales without a card.
eth_getUncleByBlockNumberAndIndex is the height-based counterpart to the hash variant: on proof-of-work chains it returns the uncle (ommer) block header at a given index within the block at a specified height or block tag. On the Avalanche C-Chain (chain ID 43114, fees paid in AVAX), blocks are finalized by the Snowman/Avalanche BFT protocol rather than mined competitively, so no uncle blocks ever exist and this method returns null at every height — including latest. It remains exposed at https://avalanche.therpc.io/YOUR_API_KEY so standard EVM clients that probe for uncles keep working against the C-Chain.
null for every block, since Avalanche produces no uncles.earliest: convenient for height-based access in general, but on the C-Chain there are no uncle headers to retrieve at any height; use eth_getBlockByNumber for the canonical header instead.| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | blockTag | string | Yes | The block that references the uncle. |
| 2 | uncleIndex | string (hex) | Yes | Zero-based index of the uncle within the block's uncles array. |
| Type | Description |
|---|---|
| object | null | Same uncle header object as eth_getUncleByBlockHashAndIndex. Returns null if not found. |
Try it live in the Avalanche playground.
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Block tag or uncle index is malformed. |
null for recent blocks and for latest alike — do not treat an empty result as an error.Parameters
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0")