Skip to main content

eth_blockNumber

Overview

The 'eth_blockNumber' method returns the current latest block number.

Request

curl --request POST \
--url https://ethereum-mainnet-geth-archive.node.coinapi.io \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY" \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_blockNumber"
}'

You can also replace mainnet with any other supported network

Response

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

A hexadecimal of an integer representing the current block number the client is on.