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

Returns most recent block number

Curl
Postman
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}'
​

{
"jsonrpc": "2.0",
"result": "0x1062f20",
"id": 1
}
Copy link
On this page
eth_blockNumber