Powered By GitBook
eth_getUncleByBlockHashAndIndex
Returns information about an uncle of a block by hash and uncle index position.

Parameters

    QUANTITY|TAG - a block number, or the string "earliest", "latest" or "pending", as in the
    QUANTITY - the uncle's index position.
1
params: [
2
'0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35',
3
'0x0' // 0
4
]
Copied!

Returns

NOTE: The return does not contain a list of transactions in the uncle block, to get this, make another request to eth_getBlockByHash or eth_getBlockByNumber​

​Example​

Request
Curl
Postman
1
curl https://eth-mainnet.alchemyapi.io/v2/your-api-key \
2
-X POST \
3
-H "Content-Type: application/json" \
4
-d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params":["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"],"id":0}'
Copied!
1
URL: https://eth-mainnet.alchemyapi.io/v2/your-api-key
2
RequestType: POST
3
Body:
4
{
5
"jsonrpc":"2.0",
6
"method":"eth_getUncleByBlockHashAndIndex",
7
"params":["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"],
8
"id":0
9
}
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 0,
4
"result": {
5
"difficulty": "0xbf93da424b943",
6
"extraData": "0x65746865726d696e652d657539",
7
"gasLimit": "0x7a121d",
8
"gasUsed": "0x79ea62",
9
"hash": "0x824cce7c7c2ec6874b9fa9a9a898eb5f27cbaf3991dfa81084c3af60d1db618c",
10
"logsBloom": "0x0948432021200401804810002000000000381001001202440000010020000080a016262050e44850268052000400100505022305a64000054004200b0c04110000080c1055c42001054b804940a0401401008a00112d80082113400c10006580140005011a40220020000010001c0a00082300434002000050840010102082801c2000148540201004491814020480080111a0300600000003800640024200109c00202010044000880000106810a1a010000028a0100000422000140011000050a2a44b3080001060800000540c108102102600d000004730404a880100600021080100403000180000062642408b440060590400080101e046f08000000430",
11
"miner": "0xea674fdde714fd979de3edf0f56aa9716b898ec8",
12
"mixHash": "0x0b15fe0a9aa789c167b0f5ade7b72969d9f2193014cb4e98382254f60ffb2f4a",
13
"nonce": "0xa212d6400b89b3f6",
14
"number": "0x5bad54",
15
"parentHash": "0x05e19fb68d9ec798073808e8b3170875cb327d4b6cde7d6f60fe194677bb26fd",
16
"receiptsRoot": "0x90807b32c4aa4610c57289de57fa68ba50ed53f14dd2c25f1862aa049029dcd6",
17
"sha3Uncles": "0xf763576c1ea6a8c61a206e16b1a2451bec5cba1c7545d7ff733a1e8c78715569",
18
"size": "0x216",
19
"stateRoot": "0xebc7a1603bfffe0a14bdb89f898e2f2824abb40f04579beb7b920c56d6e273c9",
20
"timestamp": "0x5b54143f",
21
"transactionsRoot": "0x7562cba41e067b364b933e7b566fb2444f6954fef3964a5a487d4cd79d97a56c",
22
"uncles": []
23
}
24
}
Copied!

​

Last modified 2mo ago
Copy link