getVoteAccounts - Solana
The getVoteAccounts JSON-RPC method retrieves detailed information about active vote accounts on the Solana network, including validators’ staking activity and performance metrics.
The getVoteAccounts RPC method returns a list of active vote accounts, highlighting key parameters such as activatedStake, commission, and epochCredits.
As part of Solana’s Core API, it enables developers to monitor validator health, track decentralization metrics, and analyze governance-related value distributions.
getVoteAccounts RPC Solana method supports optional filters like votePubkey (to target specific validators) and keepUnstakedDelinquents (to include inactive validators). By leveraging these parameters, Web3 applications can tailor data retrieval for staking analytics or real-time network audits.
Supported Networks
Access this method via Solana API endpoints:
Mainnet
Devnet
Parameters
Config (object, optional)
Customize the request with these fields:
commitment (string, optional): Confirmation level: finalized (default), confirmed, or processed.
votePubkey (string, optional): Filter results to a specific validator’s vote address (Base58-encoded).
keepUnstakedDelinquents (bool, optional): Include delinquent validators with no active stake (default: false).
delinquentSlotDistance (u64, optional): Define the slot distance threshold for marking validators as delinquent.
Request
API Endpoints
Example (cURL)
Response
A successful response returns two lists: current (active validators) and delinquent (underperforming validators). Each entry includes metrics like stake, commission, and voting history.
getVoteAccounts example Response
Key Response Fields
activatedStake: Stake delegated to the validator (in lamports).
commission: Validator’s fee percentage.
epochCredits: Voting credits earned per epoch.
lastVote: Slot of the validator’s latest vote.
Error Handling
Common getVoteAccounts error scenarios include:
Invalid votePubkey format.
Unsupported parameters (e.g., delinquentSlotDistance with non-standard values).
Missing API key or incorrect endpoint.
Error Response Example
Use Case
The Solana getVoteAccounts method powers:
Staking platforms evaluating validator performance.
Governance dashboards tracking voting participation.
Analytics tools calculating network decentralization metrics.
Block explorers displaying validator-specific transaction histories.
By filtering with votePubkey or analyzing epochCredits, developers build applications that enhance transparency in Solana’s block production ecosystem.
Code getVoteAccounts Example – Web3 Integration
Integration with Web3
Integrate the Web3 getVoteAccounts RPC method into Web3 applications to monitor validator networks, optimize staking strategies, and ensure compliance with governance standards. By leveraging Core API parameters like commitment and votePubkey, developers deliver real-time insights into Solana’s decentralized value ecosystem.
Last updated