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

Parameters

  • <object> - (optional) Config object:
    • commitment: (optional) Configures the commitment level of the blocks queried Accepts one of the following strings: ["finalized", "confirmed", "processed"] For more info, refer to this doc.
    • votePubkey: (optional) <base-58 encoded string> - Only return results for this validator vote address
    • keepUnstakedDelinquents: (optional) <bool> - Do not filter out delinquent validators with no stake
    • delinquentSlotDistance: (optional) <u64> - Specify the number of slots behind the tip that a validator must fall to be considered delinquent. NOTE: For the sake of consistency between ecosystem products, it is not recommended that this argument be specified.

Result

  • votePubkey: <base-58 encoded string string> - Vote account address
  • nodePubkey: <base-58 encoded string string> - Validator identity, as base-58 encoded string
  • activatedStake: <u64> - the stake, in lamports, delegated to this vote account and active in this epoch
  • epochVoteAccount: <bool> - whether the vote account is staked for this epoch
  • commission: <number>, percentage (0-100) of rewards payout owed to the vote account
  • lastVote: <u64> - Most recent slot voted on by this vote account
  • epochCredits: <array> - History of how many credits earned by the end of each epoch, as an array of arrays containing: [epoch, credits, previousCredits]

Example

Request

cURL
1
curl --location --request POST 'https://solana-mainnet.g.alchemy.com/v2/demo/' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"jsonrpc": "2.0",
5
"id": 1,
6
"method": "getVoteAccounts"
7
}'
Copied!

Response

1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"current": [
5
{
6
"commission": 0,
7
"epochVoteAccount": true,
8
"epochCredits": [
9
[1, 64, 0],
10
[2, 192, 64]
11
],
12
"nodePubkey": "B97CCUW3AEZFGy6uUg6zUdnNYvnVq5VG8PUtb2HayTDD",
13
"lastVote": 147,
14
"activatedStake": 42,
15
"votePubkey": "3ZT31jkAGhUaw8jsy4bTknwBMP8i4Eueh52By4zXcsVw"
16
}
17
],
18
"delinquent": [
19
{
20
"commission": 127,
21
"epochVoteAccount": false,
22
"epochCredits": [],
23
"nodePubkey": "6ZPxeQaDo4bkZLRsdNrCzchNQr5LN9QMc9sipXv9Kw8f",
24
"lastVote": 0,
25
"activatedStake": 0,
26
"votePubkey": "CmgCk4aMS7KW1SHX3s9K5tBJ6Yng2LBaC8MFov4wx9sm"
27
}
28
]
29
},
30
"id": 1
31
}
Copied!