getbestblockhash
method returns the hash of the best block in the most-work fully-validated chain. The best block is the tip of the blockchain, representing the most recent block that has been validated and added to the chain.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
none
Response
result
— a hex-encoded string representing the hash of the best block in the longest blockchain.error
— an object containing an error message if an error occurred, otherwisenull
.id
— an integer representing the ID of the request, used to match requests with responses.
Use case
Thegetbestblockhash
method is useful for applications that need to know the current state of the blockchain. For example, a wallet application may use this method to determine the latest block to scan for transactions relevant to the wallet’s addresses.Body
application/json
Response
200 - application/json
The hash of the best (tip) block
The response is of type object
.