getblockcount

BitcoinC1

Returns the current block height — the number of blocks in the longest valid chain. Takes no parameters.

Endpoint
POST https://api.1st-node.com/v1/bitcoin/rpc

Returns

number — the current block height.

Request

curl https://api.1st-node.com/v1/bitcoin/rpc \
  -H "Authorization: Bearer $ONE_KEY" \
  -H "content-type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockcount",
  "params": []
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockcount",
  "params": []
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 854120
}
More blocks methods on Bitcoin

Bitcoin API

Top up, get a key, ship.

Self-serve. Pay in crypto or card. Metered by credits — heavy primitives cost more, simple ones are cheap.

Get API key