getVoteAccounts
Returns the account info and associated stake for all the voting accounts in the current bank.
Common use cases
| Validator discovery for staking | Query all active validators with stake and commission data to present delegation options in staking interfaces. Filter by votePubkey to validate a specific validator exists and is not delinquent before delegating stake. |
| Network stake distribution analysis | Aggregate activatedStake across all validators to calculate stake concentration, Nakamoto coefficient, and network decentralization metrics for monitoring tools and analytics dashboards. |
| Validator health monitoring | Track validator delinquency status and voting activity over time by comparing current vs delinquent arrays at regular intervals. Use keepUnstakedDelinquents: true to monitor all validators regardless of stake. |
| Commission rate tracking | Monitor commission changes across validators to alert stake pool operators and delegators when target validators modify fee structures, enabling informed re-delegation decisions. |
Parameters
config (object, optional)
Configuration object containing the following fields:
Fields:
commitment(string): The commitment describes how finalized a block is at that point in time. See Configuring State Commitment.votePubkey(string): Only return results for this validator vote address (base-58 encoded)keepUnstakedDelinquents(bool): Do not filter out delinquent validators with no stakedelinquentSlotDistance(u64): Specify the number of slots behind the tip that a validator must fall to be considered delinquent. NOTE: For the sake of consistency between ecosystem products, it is not recommended that this argument be specified.
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": "getVoteAccounts",
"params": [
{
"commitment": "finalized",
"votePubkey": "i7NyKBMJCA9bLM2nsGyAGCKHECuR2L5eh4GqFciuwNT"
}
]
}'
// 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": "getVoteAccounts",
"params": [
{
"commitment": "finalized",
"votePubkey": "i7NyKBMJCA9bLM2nsGyAGCKHECuR2L5eh4GqFciuwNT"
}
]
})
});
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": "getVoteAccounts",
"params": [
{
"commitment": "finalized",
"votePubkey": "i7NyKBMJCA9bLM2nsGyAGCKHECuR2L5eh4GqFciuwNT"
}
]
}
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": {
"current": [
{
"activatedStake": 38263229364446900,
"commission": 95,
"epochCredits": [
[902, 1383125544, 1376213656],
[903, 1390037304, 1383125544],
[904, 1396949288, 1390037304],
[905, 1403861272, 1396949288],
[906, 1406766600, 1403861272]
],
"epochVoteAccount": true,
"lastVote": 391573587,
"nodePubkey": "dv2eQHeP4RFrJZ6UeiZWoc3XTtmtZCUKxxCApCDcRNV",
"rootSlot": 391573556,
"votePubkey": "i7NyKBMJCA9bLM2nsGyAGCKHECuR2L5eh4GqFciuwNT"
}
],
"delinquent": []
},
"id": 1
}
Response Fields
activatedStake (u64)
The stake, in lamports, delegated to this vote account and active in this epoch
commission (number)
Percentage (0-100) of rewards payout owed to the vote account
epochCredits (array)
Latest history of earned credits for up to five epochs, as an array of arrays containing: [epoch, credits, previousCredits]
epochVoteAccount (bool)
Whether the vote account is staked for this epoch
lastVote (u64)
Most recent slot voted on by this vote account
nodePubkey (string)
Validator identity, as base-58 encoded string
rootSlot (u64)
Current root slot for this vote account
votePubkey (string)
Vote account address, as base-58 encoded string
FAQ and Troubleshooting
Why does my validator appear in the delinquent array?
Validators are marked delinquent when they fail to vote within the configured delinquentSlotDistance (default varies by cluster). Check the validator's voting status with getVoteAccounts - if lastVote is significantly behind current slot, the validator may be offline or having consensus issues.
What's the difference between current and delinquent validators?
The current array contains validators actively voting within the delinquency threshold, while delinquent contains validators that haven't voted recently. By default, delinquent validators with zero activated stake are excluded unless keepUnstakedDelinquents: true is set.
How do I find a specific validator's commission rate?
Filter by votePubkey parameter to get a single validator, then read the commission field from the result. Commission is expressed as an integer percentage (e.g., commission: 5 means 5%).
Why can't I access getVoteAccounts data on-chain in my program?
Solana programs cannot directly query global validator data or perform RPC-style aggregations due to runtime constraints. Vote account data must be passed as account arguments or accessed via off-chain indexing then submitted to your program.
What does epochVoteAccount indicate?
The epochVoteAccount boolean shows whether the validator's vote account is eligible for staking rewards in the current epoch. true means the validator is actively participating in consensus and earning rewards.
Related Methods
getClusterNodes
Provides validator network information (IP, version, gossip). Combine with getVoteAccounts to build comprehensive validator dashboards showing both consensus participation and network connectivity.
getEpochInfo
Returns current epoch timing and progression. Use with getVoteAccounts epoch credits to calculate per-epoch voting performance and estimate reward accumulation.
accountSubscribe
Subscribe to changes for a specific vote account. Use with individual vote account pubkeys from getVoteAccounts to receive real-time notifications when stake delegation or account data changes.
getAccountInfo
Retrieves raw account data for a specific vote account pubkey. Use when you need detailed vote state beyond the aggregated data in getVoteAccounts response.
External Resources
- Solana Official Documentation
- Understanding Solana Vote Accounts - Official terminology defining vote accounts, their relationship to validators, and role in consensus. Essential background for interpreting
getVoteAccountsresponse structure. - Staking Guide - Choosing a Validator - Guidance on evaluating validators using metrics from
getVoteAccountsincluding commission rates, voting history, and stake distribution considerations.