getVoteAccounts
https://api.triport.io/Returns the account info and associated stake for all the voting accounts in the current bank on Solana.
getVoteAccounts returns every voting account known to the current bank,
split into two arrays: current (validators that are actively voting) and
delinquent (validators that have stopped voting recently enough to still be
tracked). Each entry carries the validator's vote and node identities, its
activated stake, commission, and the slot of its most recent vote. Use it to
build validator dashboards, compute stake distribution, or detect validators
that have fallen behind the cluster.
By default the result contains the full validator set, which is large. Pass
votePubkey to scope the response to a single validator — the most common way
to use this method when you only care about one operator. The delinquent
classification is governed by delinquentSlotDistance: a validator whose last
vote lags the current slot by more than this distance is reported as
delinquent.
This is a read method in the sol_read_rpc category, so it shares the standard
free-tier RPS budget with the rest of the Solana read surface. Because the
unfiltered response can be sizeable, prefer votePubkey filtering when you can.
Parameters
A single optional positional parameter: a config object.
configobjectoptionalconfig fieldsobjectcommitmentstringoptionalprocessed, confirmed, or finalized. Defaults to finalized.votePubkeystringoptionalkeepUnstakedDelinquentsbooleanoptionaltrue, delinquent validators that currently have no active stake are kept in the response. Default behavior omits them.delinquentSlotDistanceintegeroptionalResponse
Response fields
The result is a VoteAccountsResponse object.
| Field | Type | Description |
|---|---|---|
current | VoteAccount[] | Validators that are actively voting. |
delinquent | VoteAccount[] | Validators whose last vote lags the tip by more than delinquentSlotDistance. |
Each entry in current / delinquent is a VoteAccount:
| Field | Type | Description |
|---|---|---|
votePubkey | string | Base-58 encoded vote account address of the validator. |
nodePubkey | string | Base-58 encoded identity (node) public key of the validator. |
activatedStake | integer | Stake, in lamports, delegated to this vote account and active in this epoch. |
epochVoteAccount | boolean | Whether the vote account is staked for this epoch. |
commission | integer | Percentage (0–100) of rewards owed to the validator. |
lastVote | integer (u64) | Most recent slot this validator has voted on. |
epochCredits | array | History of earned credits, as [epoch, credits, previousCredits] tuples. |
rootSlot | integer (u64) | Current root slot for this vote account. |
Errors
getVoteAccounts uses the standard JSON-RPC error envelope. See
errors for the full structure.
| Code | Meaning | When it happens |
|---|---|---|
-32602 | Invalid params | commitment is not one of processed / confirmed / finalized, votePubkey is not a valid base-58 address, or config is malformed. |
-32003 | Rate limited | You exceeded your tier's RPS for sol_read_rpc (HTTP 429). |
401 | Unauthorized | Missing or invalid Authorization: Bearer token. |
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "getVoteAccounts",
params: [{ votePubkey: "3ZT3iqr1HZpRZj8Sj7XK6X4Gd9G3F5gN6yJ9eX1mabc" }],
}),
});
const { result } = await res.json();
console.log("active validators:", result.current.length);
console.log("delinquent validators:", result.delinquent.length);TypeScript SDK (@triport/sdk)
import { TriportClient } from "@triport/sdk";
const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY! });
const { current, delinquent } = await client.solana.getVoteAccounts({
votePubkey: "3ZT3iqr1HZpRZj8Sj7XK6X4Gd9G3F5gN6yJ9eX1mabc",
commitment: "confirmed",
});
console.log("stake:", current[0]?.activatedStake);
console.log("delinquent count:", delinquent.length);Python (triport-sdk)
import os
from triport import TriportClient
client = TriportClient(api_key=os.environ["TRIPORT_API_KEY"])
result = client.solana.get_vote_accounts(
vote_pubkey="3ZT3iqr1HZpRZj8Sj7XK6X4Gd9G3F5gN6yJ9eX1mabc",
commitment="confirmed",
)
print("active validators:", len(result["current"]))
print("delinquent validators:", len(result["delinquent"]))Notes
- Filter with
votePubkey. The unfiltered response covers the entire validator set and can be large. If you only track specific operators, passvotePubkeyto keep the response small and the call cheap. currentvsdelinquent. A validator is delinquent when itslastVotelags the cluster tip by more thandelinquentSlotDistance. Tune that field only if you have a specific staleness threshold in mind.- Stake is in lamports.
activatedStakeis denominated in lamports (1 SOL = 1,000,000,000 lamports); divide accordingly before display. - Related methods:
getClusterNodes(gossip view of nodes),getLeaderSchedule, andgetEpochInfofor the epoch context behindepochCredits.