BNB Smart Chain
eth_getUncleByBlockNumberAndIndex
This is the height-addressed sibling of eth_getUncleByBlockHashAndIndex. Same empty result; the only difference is how you name the block. On BNB Smart Chain (chain ID 56, gas paid in BNB) the PoSA validator set seals one canonical block roughly every three seconds under fast finality, so orphaned siblings never form. The eth_getUncleByBlockNumberAndIndex method at https://bsc.therpc.io/YOUR_API_KEY carries forward the Ethereum API surface and nothing more. You point it at a block by number or by a tag such as latest, then give it an ommer position. Where Ethereum would return a sibling header, chain 56 returns null. No uncle exists at any height to read.
Use cases
- Walk a sequential range of block numbers to collect uncle headers for an uncle-rate study; on chain 56 every entry comes back
null, confirming the rate is zero. - Reach for the
earliesttag to inspect genesis-era uncle data without first looking up a hash. The syntax is convenient, though BNB Smart Chain still has nothing to return there.
Parameters
| # | 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. |
Response
| Type | Description |
|---|---|
| object | null | Same uncle header object as eth_getUncleByBlockHashAndIndex. Returns null if not found. |
Example request
Try it live in the BNB Smart Chain playground.
Errors & troubleshooting
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Block tag or uncle index is malformed. |
Common pitfalls
- BNB Smart Chain's PoSA design produces no uncles, so this method returns
nullno matter which height or tag you target. Never build logic that blocks waiting for a non-null header. - If you ever receive an uncle header from another network, recall that it omits the transactions array entirely, so never iterate transactions off this result.
Supported networks
- Mainnet — Chain ID: 56
- Testnet — Chain ID: 97
See also
Parameters
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0")