eth_blockNumber - Ethereum

Shows you the number of the last block

How to Use the eth_blockNumber Method

Parameters

No parameters

What you receive

BLOCK NUMBER: a hexadecimal code that presents an actual block that the client is currently working with.

Sample

Here is a typical appliance example.

Call

curl https://eth-mainnet.rpcfast.com/?api_key=<key> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":0}' 

Outcome

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

Last updated