getVoteAccounts — Solana JSON-RPC
Returns the account info and associated stake for all the voting accounts in the current bank on Solana.
https://triport.io/sol- Network
- Solana
- Auth
- x-token: $TRIPORT_API_KEY (or Authorization: Bearer)
- Rate limit
- free+ — 20 rps (free) · 60 rps (basic) · 200 rps (pro) · 600 rps (business)
Endpoint and plans: Solana RPC endpoint.
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 (available from the Free
trial up), so it shares the same per-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. |
429 | Rate limited | You exceeded your tier's RPS for sol_read_rpc. An HTTP error, not a JSON-RPC one: body {"error":"rate_limited", …} with limit_rps, burst_capacity and retry_after_sec, plus Retry-After and X-RateLimit-Reset headers. |
401 | Unauthorized | Missing or invalid Authorization: Bearer token. |
Examples
JavaScript (fetch)
const res = await fetch("https://triport.io/sol", {
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);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.