eth_blockNumber

Returns the number of most recent block.

Ethereum.org API Reference

Parameters

None

Returns

QUANTITY - integer of the current block number the client is on.

Example

Request

curl --request POST \
     --url https://endpoints.omniatech.io/v1/RPC_ENDPOINT \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_blockNumber"
}
'

Response

{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x4b7" // 1207
}

Last updated