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
| # | Type | Required | Description |
|---|---|---|---|
| 1 | object | No | Configuration object |
Configuration object fields:
| Field | Type | Description |
|---|---|---|
commitment | string | Commitment level: processed, confirmed, or finalized |
votePubkey | string | Only return results for this vote account (base-58) |
keepUnstakedDelinquents | bool | Do not filter out delinquent validators with no stake |
delinquentSlotDistance | u64 | Specify the number of slots behind the tip that a validator must fall to be considered delinquent |
Response
Returns an object with two arrays:
| Field | Type | Description |
|---|---|---|
current | array | Array of currently active vote accounts |
delinquent | array | Array of delinquent vote accounts |
[].votePubkey | string | Vote account public key (base-58) |
[].nodePubkey | string | Validator identity (base-58) |
[].activatedStake | u64 | Stake in lamports delegated to this vote account |
[].epochVoteAccount | bool | Whether this account is staked for the current epoch |
[].commission | u8 | Percentage (0-100) of rewards payout owed to the vote account |
[].lastVote | u64 | Most recent slot voted on |
[].epochCredits | array | History of earned credits: [epoch, credits, previousCredits] |
[].rootSlot | u64 | Current 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}