POST
/
788f110831fe13808302bd79796d55e8
curl --request POST \
  --url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "1.0",
  "method": "getbestblockhash",
  "id": 1
}'
{
  "result": "<string>",
  "error": {},
  "id": 123
}

The 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 today

Start 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, otherwise null.
  • id — an integer representing the ID of the request, used to match requests with responses.

Use case

The getbestblockhash 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.