{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "latest"
  ]
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0x1"
}
Defined in the Ethereum JSON-RPC Specification
Returns the number of uncles in a block by block number.

Parameters

blockParameter
string
required
Integer block number, or the string “latest”, “earliest” or “pending”.

Returns

result
string
The number of uncles in this block as a hexadecimal string.
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "latest"
  ]
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0x1"
}

Error Handling

CodeMessageDescription
-32602Invalid block parameterThe provided block parameter is invalid
4100Requested method not supportedThe method is not supported by the wallet
Uncle blocks are blocks that were mined but not included in the main blockchain. This method returns their count for a specific block number.