getBlockHeight - Solana

getBlockHeight. Retrieves the current block height

getBlockHeight - solana [Value: 11CU]
Retrieves the current block height
Use cases

Use cases

  • Monitor blockchain growth by checking the block height
  • Validate the network's latest block for data integrity
  • Ensure node synchronization with the current block height
Constraints

Constraints

  • Requires active node connection
  • Network delays can affect response times
  • Frequent requests may trigger rate limiting
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 --request POST \
     --url https://solana.drpc.org \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "getBlockHeight"
}
'
Copy
Response
200
{
  "id": 0,
  "jsonrpc": "string",
  "result": 0
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersarray of objects
array of objects
commitmentstring
The level of commitment required for the query
  • finalized - The node will query the most recent block confirmed by supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized
  • confirmed - The node will query the most recent block that has been voted on by supermajority of the cluster
  • processed - The node will query its most recent block. Note that the block may not be complete

Response

200
The current block height

Response params

array of objects
idinteger
jsonrpcstring
resultinteger