Request
curl https://eth.l0vdinfra.com/YOUR_KEY \
-X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_getUncleByBlockHashAndIndex","params":["0x9367448067f6cd79676ccf0ab3c4b84bda22967ff2c36497aef8fd67211ee3c0","0x0"]}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x140ece1efa0c7e",
"extraData": "0x6e616e6f706f6f6c2e6f7267",
"gasLimit": "0xbe5c00",
"gasUsed": "0xbe331f",
"hash": "0x3e152d5f45a09fc921a54e6528dcc0d3021b5a497939de36286ae1cb2e98b146",
"logsBloom": "0x6df63548468a410f94bc02ec860d37c168182430855e80883509093250d0c174e297b3d12bd09836e14e199e4a110b9b2e670111ecf28907ff48d371de620c66365100da6b622222e892599fe1280275a610e08741485e0a058696cc98495c2c54a26157…",
"miner": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5",
"mixHash": "0x82e7b0a8a1adb1ba92d4cd44418bc7859652e05a4aee1ab0d9320c366ea69af1",
"nonce": "0x6513f16bbb7132f2",
"number": "0xb71b7e",
"parentHash": "0xf7d687835704767d409168714457c8f5d858138fb5d2f1ebf02ed5242f3cf556",
"receiptsRoot": "0x0042e2e1a80a9d11d2e41733d651a5b0affc4448604fe9ab3e4a3e2c0b4b3536",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x215",
"stateRoot": "0xf4cd64089ceb0b7a2daddc9348411d5aad8d40404c9307061a5116b5d3d1acc0",
"timestamp": "0x60468da1",
"transactions": [],
"transactionsRoot": "0xdc436dabb01e8afc820ece5d62db5e523b743148df86493b334c06f41901af58",
"uncles": []
}
}
Long arrays and hex strings are shortened in this example.
Params and your endpoint
Parameters
blockHashstringrequired- 32-byte block hash.
indexstringrequired- Uncle index, hex.
Returns
object Uncle block header, or null.
numberstring- Block number, hex.
hashstring- Block hash.
parentHashstring- Hash of the parent block.
timestampstring- Unix timestamp, hex.
minerstring- Fee recipient address.
gasUsedstring- Total gas used by the block's transactions, hex.
gasLimitstring- Block gas limit, hex.
baseFeePerGasstring- EIP-1559 base fee, hex wei (London and later).
logsBloomstring- Bloom filter for the block's logs.
stateRootstring- Root of the state trie after the block.
When to use it
Read an uncle header from a block identified by hash.
How to read the result
A block header without transactions, or null.
Tips
- Reorg-safe variant of the by-number call.
Related methods