💎 Ethereum
eth_getUncleCountByBlockNumber

eth_getUncleCountByBlockNumber RPC method

Returns

uncles - The number of uncles in the block encoded as hexadecimal.

Parameters

  • blockNumber or Tag - Block number as hexadecimal or the Tag ("latest", "earliest", "pending", "safe" or "finalized").

"Safe" and "finalized" are only availible on Ethereum and Arbitrum One chains. Read block parameter description (opens in a new tab).

Request

POST https://<network>.chainnodes.org/YOUR-API-KEY

Example

  • HTTPS POST Request with a JSON RPC call in the body
  • Replace YOUR-API-KEY with the API key from your Chainnodes.org Dashboard
  • You can use a different supported network by replacing mainnet
curl https://mainnet.chainnodes.org/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params":["earliest"],"id":1}'

Body

{
   "jsonrpc": "2.0",
   "id": 1,
   "result": "0x0"
}