getHighestSnapshotSlot - Solana
Example code for the getHighestSnapshotSlot JSON-RPC method. Complete guide on how to use the getHighestSnapshotSlot JSON-RPC method in the GetBlock Web3 documentation.
Parameters
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "getHighestSnapshotSlot",
"params": [],
"id": "getblock.io"
}'const { Connection } = require('@solana/web3.js');
const connection = new Connection('https://go.getblock.io/<ACCESS-TOKEN>/', 'confirmed');
const snapshot = await connection._rpcRequest('getHighestSnapshotSlot', []);
console.log(snapshot.result);import requests
response = requests.post(
'https://go.getblock.io/<ACCESS-TOKEN>/',
headers={'Content-Type': 'application/json'},
json={
'jsonrpc': '2.0',
'method': 'getHighestSnapshotSlot',
'params': [],
'id': 'getblock.io'
}
)
print(response.json()['result'])Response
{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": {
"full": 397200000,
"incremental": 397233361
}
}Response Parameters
Parameter
Type
Description
Result Object
Field
Type
Description
Use Cases
Error Handling
Error Code
Message
Description
Was this helpful?