Avalanche Samples

Avalanche nodes accept HTTP requests using the JSON-RPC 2.0 specification.

eth_blockNumber

Returns most recent block number

Request

curl https://avalanche-mainnet-rpc.allthatnode.com/ext/bc/C/rpc \
--header "x-allthatnode-api-key: 'YOUR-API-KEY'" \
--request POST \
--header 'content-type:application/json;' \
--data '{ "jsonrpc":"2.0", "method":"eth_blockNumber","params":[],"id":1}'

Response

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

Last updated