TriportRPC

getVoteAccounts

POSThttps://api.triport.io/

Returns the account info and associated stake for all the voting accounts in the current bank on Solana.

Solanafree+ — 20 rps (free) · 60 rps (basic) · 200 rps (pro) · 600 rps (business)

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.

configobjectoptional
Configuration object (see fields below). Omit it entirely to use defaults and return the full validator set.
config fieldsobject
commitmentstringoptional
Commitment level: processed, confirmed, or finalized. Defaults to finalized.
votePubkeystringoptional
Base-58 encoded validator vote account address. When set, only this validator is returned.
keepUnstakedDelinquentsbooleanoptional
If true, delinquent validators that currently have no active stake are kept in the response. Default behavior omits them.
delinquentSlotDistanceintegeroptional
Number of slots behind the tip after which a validator is classified as delinquent. Overriding this is rarely needed; the cluster default is used when omitted.

Response

Response fields

The result is a VoteAccountsResponse object.

FieldTypeDescription
currentVoteAccount[]Validators that are actively voting.
delinquentVoteAccount[]Validators whose last vote lags the tip by more than delinquentSlotDistance.

Each entry in current / delinquent is a VoteAccount:

FieldTypeDescription
votePubkeystringBase-58 encoded vote account address of the validator.
nodePubkeystringBase-58 encoded identity (node) public key of the validator.
activatedStakeintegerStake, in lamports, delegated to this vote account and active in this epoch.
epochVoteAccountbooleanWhether the vote account is staked for this epoch.
commissionintegerPercentage (0–100) of rewards owed to the validator.
lastVoteinteger (u64)Most recent slot this validator has voted on.
epochCreditsarrayHistory of earned credits, as [epoch, credits, previousCredits] tuples.
rootSlotinteger (u64)Current root slot for this vote account.

Errors

getVoteAccounts uses the standard JSON-RPC error envelope. See errors for the full structure.

CodeMeaningWhen it happens
-32602Invalid paramscommitment is not one of processed / confirmed / finalized, votePubkey is not a valid base-58 address, or config is malformed.
-32003Rate limitedYou exceeded your tier's RPS for sol_read_rpc (HTTP 429).
401UnauthorizedMissing 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, pass votePubkey to keep the response small and the call cheap.
  • current vs delinquent. A validator is delinquent when its lastVote lags the cluster tip by more than delinquentSlotDistance. Tune that field only if you have a specific staleness threshold in mind.
  • Stake is in lamports. activatedStake is denominated in lamports (1 SOL = 1,000,000,000 lamports); divide accordingly before display.
  • Related methods: getClusterNodes (gossip view of nodes), getLeaderSchedule, and getEpochInfo for the epoch context behind epochCredits.