BNB Smart Chain

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.

Not available on this chainBecause BSC's PoSA consensus never creates uncle (ommer) blocks, there is no sibling to fetch and this method always returns null.

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 earliest tag 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

#NameTypeRequiredDescription
1blockTagstringYesThe block that references the uncle.
2uncleIndexstring (hex)YesZero-based index of the uncle within the block's uncles array.

Response

TypeDescription
object | nullSame uncle header object as eth_getUncleByBlockHashAndIndex. Returns null if not found.

Example request

curl https://bsc.therpc.io/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleByBlockNumberAndIndex",
"params": [
"latest",
"0x0"
],
"id": 1
}'

Try it live in the BNB Smart Chain playground.

Errors & troubleshooting

CodeMessageCause
-32602Invalid paramsBlock tag or uncle index is malformed.

Common pitfalls

  • BNB Smart Chain's PoSA design produces no uncles, so this method returns null no 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")

curl https://bsc.therpc.io/YOUR_API_KEY \
-X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_getUncleByBlockNumberAndIndex","params":["","0x0"]}'

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.