getVersion
Returns the current Solana version running on the node
Common use cases
| Compatibility gating | Verify RPC node version before invoking methods that require specific Solana releases or feature-set support. Essential for applications using versioned transactions (v0) or newer RPC endpoints introduced in specific versions. |
| Operational monitoring | Log node version in application telemetry to correlate behavior changes with Solana releases. Useful for debugging issues that may be version-specific or tracking validator software updates. |
Parameters
No parameters required.
Request
- cURL
- JavaScript
- Python
curl https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getVersion"
}'
// Using fetch
const response = await fetch('https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "getVersion"
})
});
const data = await response.json();
console.log(data);
import requests
import json
url = 'https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY'
headers = {'Content-Type': 'application/json'}
data = {
"jsonrpc": "2.0",
"id": 1,
"method": "getVersion"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
Replace mainnet with devnet in the URL to query devnet instead.
Response
{
"jsonrpc": "2.0",
"result": {
"solana-core": "1.16.7",
"feature-set": 2891131721
},
"id": 1
}
Response Fields
solana-core (string)
Software version of solana-core
feature-set (u32)
Unique identifier of the current software's feature set
FAQ and Troubleshooting
What does 'cluster version query failed' error mean?
This connection error occurs when Solana CLI (solana balance, anchor deploy) calls getVersion to verify RPC connectivity. Check your network connection, RPC URL in config, and ensure the RPC node is running and accessible.
Related Methods
getClusterNodes
Returns contact info for all cluster nodes including version field. Compare with getVersion to audit version consistency across nodes or identify version mismatches.
getHealth
Returns node health status indicating if behind. Pair with getVersion when troubleshooting unhealthy nodes that may be running outdated versions causing sync issues.
getEpochInfo
Returns current epoch and slot progress at node's state. Combine with getVersion to understand if version differences affect epoch boundaries or consensus participation.