getblockcount - Bitcoin
getblockcount. Returns the total number of blocks currently present
getblockcount - bitcoin [Value: 20CU]
Retrieves the hash of a block by height.

Use cases
- Get the current Bitcoin block count
- Monitor blockchain growth
- Verify the latest block in the chain

Constraints
- Requires a synced node
- Only provides latest block count
- Depends on network connectivity
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl  https://bitcoin.drpc.org \
    -X POST \
    -H "Content-Type: application/json" \
    --data '{ "method": "getblockcount" }'Response
200
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": 681543
}
Request params
idinteger
jsonrpcstring
methodstring
Response
200
Response params
object
idinteger
jsonrpcstring
resultstring
The hash of the block.
object
resultnumeric
The current block count.
errorstring
The error message, if any.