New: getTransactionsForAddress - Query transaction history with advanced filtering, sorting, and pagination. Learn More
English
Returns the latest blockhash.
cURL
curl --request POST \ --url 'https://mainnet.helius-rpc.com/?api-key=' \ --header 'Content-Type: application/json' \ --data ' { "jsonrpc": "2.0", "id": "1", "method": "getLatestBlockhash", "params": [ { "commitment": "processed", "minContextSlot": 1000 } ] } '
{ "jsonrpc": "2.0", "id": "1", "result": { "context": { "slot": 2792 }, "value": { "blockhash": "EkSnNWid2cvwEVnVx9aBqawnmiCNiDgp3gUdkDPTKN1N", "lastValidBlockHeight": 3090 } } }
Your Helius API key. You can get one for free in the dashboard.
The JSON-RPC protocol version.
2.0
"2.0"
A unique identifier for the request.
"1"
The name of the RPC method to invoke.
getLatestBlockhash
"getLatestBlockhash"
Optional configuration object for the request.
Show child attributes
The commitment level for the request.
confirmed
finalized
processed
"processed"
The minimum slot that the request can be evaluated at.
1000
Successfully retrieved the latest blockhash information.
Identifier matching the request.
RpcResponse containing blockhash information.
Context of the response.
The slot at which the data was fetched.
2792
Blockhash and its validity details.
The latest Solana blockhash encoded as a base-58 string, required for transaction creation.
"EkSnNWid2cvwEVnVx9aBqawnmiCNiDgp3gUdkDPTKN1N"
The last Solana block height at which this blockhash will be accepted in transactions.
3090
Was this page helpful?