getbestblockhash - Bitcoin

getbestblockhash. Retrieves the hash identifier of the most recent (latest) block in the Bitcoin blockchain.

getbestblockhash - bitcoin [Value: 30CU]
Fetches the hash of the most recent block.
Use cases

Use cases

  • Retrieve the hash of the latest block
  • Get the most recent block in the blockchain
  • Check the latest block's hash for synchronization
Constraints

Constraints

  • Requires a running node
  • Depends on node synchronization
  • Only returns the hash of the latest block
Get started
Unlock Access to 50+ 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" }'
Copy
Response
200
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": 681543
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
ParametersThis method does not accept any parameters.

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.