in-solana by Supanode

getVoteAccounts — Solana RPC Method

getVoteAccounts returns the list of validators in the cluster, split into current (active) and delinquent (behind) sets. Each entry includes the vote account, validator identity, commission, activated stake, and recent voting history.

Parameters

NameTypeRequiredDescription
commitmentstringNoprocessed, confirmed, or finalized. Default: finalized.
votePubkeystringNoFilter to a single vote account.
keepUnstakedDelinquentsboolNoInclude delinquent validators with zero active stake. Default: depends on node config.
delinquentSlotDistanceu64NoSlots a validator can be behind before being considered delinquent.

Request

curl -X POST https://api.mainnet-beta.solana.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getVoteAccounts",
    "params": []
  }'

TypeScript (@solana/kit)

import { createSolanaRpc } from "@solana/kit";

const rpc = createSolanaRpc("https://api.mainnet-beta.solana.com");
const voteAccounts = await rpc.getVoteAccounts().send();

console.log(`Current validators: ${voteAccounts.current.length}`);
console.log(`Delinquent validators: ${voteAccounts.delinquent.length}`);

Response

{
  "jsonrpc": "2.0",
  "result": {
    "current": [
      {
        "votePubkey": "3hR3XC4FKkfCBaB3yTLbVuVh3Aung6Meb94WkCCvNByK",
        "nodePubkey": "dv4ACNkpYPcE3aKmYDqZm9G5EB3J4MRoeE7WNDRBVJB",
        "activatedStake": 50000000000000,
        "epochVoteAccount": true,
        "commission": 5,
        "lastVote": 341200000,
        "epochCredits": [[789, 432000, 431500], [788, 431500, 431000]],
        "rootSlot": 341199800
      }
    ],
    "delinquent": []
  },
  "id": 1
}
FieldTypeDescription
votePubkeystringVote account public key.
nodePubkeystringValidator identity public key.
activatedStakeu64Active delegated stake in lamports.
epochVoteAccountboolWhether the account voted in the current epoch.
commissionu8Validator commission percentage (0-100).
lastVoteu64Most recent slot the validator voted on.
epochCreditsarrayArray of [epoch, credits, previousCredits] for recent epochs.
rootSlotu64The validator’s current root slot.

Common errors

  • Large response — without the votePubkey filter, the response includes all validators, which can be several megabytes.

Performance

The full response on mainnet includes 1,500+ validators and can be 2-5 MB. Use the votePubkey filter when you need data for a specific validator. The data changes slowly — polling once per minute is sufficient.

FAQ

What makes a validator delinquent? A validator is delinquent when its last vote is too many slots behind the current slot. The threshold depends on delinquentSlotDistance or the node’s default configuration.

What is commission? Commission is the percentage of staking rewards the validator keeps before distributing the rest to delegators. A commission of 5 means the validator takes 5% of the rewards.

What are epoch credits? Credits represent the validator’s voting performance in an epoch. More credits mean the validator voted on more slots. Staking rewards are proportional to credits earned.

How do I find the total active stake? Sum activatedStake across all entries in both current and delinquent arrays.

How do I find my validator’s performance? Use the votePubkey filter with your validator’s vote account. Check epochCredits to see voting history and lastVote to verify the validator is voting on recent slots.

Parameters

ParameterTypeRequiredDescriptionDefault
commitmentstringNoCommitment level: processed, confirmed, or finalized.finalized
votePubkeystringNoFilter to a single vote account public key.—
keepUnstakedDelinquentsboolNoInclude delinquent validators with zero stake.—
delinquentSlotDistanceu64NoNumber of slots behind to consider a validator delinquent.—

Updated: