getblockcount

Returns the number of blocks in the longest blockchain.

Request

curl 'https://rpc.web3api.io?x-api-key=YOUR-API-KEY' \
    -X POST \
    -H 'x-amberdata-blockchain-id: bitcoin-mainnet' \
    -d '{"jsonrpc":"2.0","id":1,"method":"getblockcount","params":[]}'

Response

{
  "result": 597720,
  "error": null,
  "id": 1
}