getVoteAccounts

Returns the account info and associated stake for all the voting accounts in the current bank. Results are split into current (actively voting) and delinquent (not voting in recent slots) categories. This method is essential for staking UIs, validator leaderboards, and monitoring dashboards that need to display validator status, commission rates, activated stake, and voting performance across the network.

Parameters

#TypeRequiredDescription
1objectNoConfiguration object

Configuration object fields:

FieldTypeDescription
commitmentstringCommitment level: processed, confirmed, or finalized
votePubkeystringOnly return results for this vote account (base-58)
keepUnstakedDelinquentsboolDo not filter out delinquent validators with no stake
delinquentSlotDistanceu64Specify the number of slots behind the tip that a validator must fall to be considered delinquent

Response

Returns an object with two arrays:

FieldTypeDescription
currentarrayArray of currently active vote accounts
delinquentarrayArray of delinquent vote accounts
[].votePubkeystringVote account public key (base-58)
[].nodePubkeystringValidator identity (base-58)
[].activatedStakeu64Stake in lamports delegated to this vote account
[].epochVoteAccountboolWhether this account is staked for the current epoch
[].commissionu8Percentage (0-100) of rewards payout owed to the vote account
[].lastVoteu64Most recent slot voted on
[].epochCreditsarrayHistory of earned credits: [epoch, credits, previousCredits]
[].rootSlotu64Current root slot for this vote account

Code Examples

cURL

1curl http://[IP_ADDRESS]:[PORT] -X POST -H "Content-Type: application/json" -d '{
2  "jsonrpc": "2.0",
3  "id": 1,
4  "method": "getVoteAccounts",
5  "params": [
6    { "votePubkey": "3ZT31jkAGhUaw8jsy4bTknwBKodUCrtcPsX46FoLKp9g" }
7  ]
8}'

TypeScript

1const response = await fetch("http://[IP_ADDRESS]:[PORT]", {
2  method: "POST",
3  headers: { "Content-Type": "application/json" },
4  body: JSON.stringify({
5    jsonrpc: "2.0",
6    id: 1,
7    method: "getVoteAccounts",
8    params: [
9      { votePubkey: "3ZT31jkAGhUaw8jsy4bTknwBKodUCrtcPsX46FoLKp9g" }
10    ]
11  }),
12});
13const { result } = await response.json();
14console.log("Active validators:", result.current.length, "Delinquent:", result.delinquent.length);

Python

1import requests
2
3response = requests.post("http://[IP_ADDRESS]:[PORT]", json={
4    "jsonrpc": "2.0",
5    "id": 1,
6    "method": "getVoteAccounts",
7    "params": [
8        {"votePubkey": "3ZT31jkAGhUaw8jsy4bTknwBKodUCrtcPsX46FoLKp9g"}
9    ]
10})
11result = response.json()["result"]
12print(f"Active: {len(result['current'])}, Delinquent: {len(result['delinquent'])}")

Rust

1use reqwest::Client;
2use serde_json::json;
3
4#[tokio::main]
5async fn main() -> Result<(), Box<dyn std::error::Error>> {
6    let client = Client::new();
7    let res = client.post("http://[IP_ADDRESS]:[PORT]")
8        .json(&json!({
9            "jsonrpc": "2.0",
10            "id": 1,
11            "method": "getVoteAccounts",
12            "params": [
13                {"votePubkey": "3ZT31jkAGhUaw8jsy4bTknwBKodUCrtcPsX46FoLKp9g"}
14            ]
15        }))
16        .send().await?
17        .text().await?;
18    println!("{}", res);
19    Ok(())
20}

Example Response

1{
2  "jsonrpc": "2.0",
3  "result": {
4    "current": [
5      {
6        "votePubkey": "3ZT31jkAGhUaw8jsy4bTknwBKodUCrtcPsX46FoLKp9g",
7        "nodePubkey": "B97CCTR6jDYBDHaKPESV4YC7ac1zu8PvLnvLjPtQJHpH",
8        "activatedStake": 42000000000000,
9        "epochVoteAccount": true,
10        "commission": 10,
11        "lastVote": 166974442,
12        "epochCredits": [[385, 64000, 60000]],
13        "rootSlot": 166974410
14      }
15    ],
16    "delinquent": []
17  },
18  "id": 1
19}