getVoteAccounts
Returns the account info and associated stake for all the voting accounts in the current bank.
https://api.1inch.com/web3/501
Supported on: Solana
Request
Request
object jsonrpc
* string (Enum)JSON-RPC version
2.0
method
* string The method to call
params
array Method parameters
items
any id
* number Request ID
JavaScript
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const response = await fetch('https://api.1inch.com/web3/501', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${API_KEY}`,
},
body: JSON.stringify({
jsonrpc: '2.0',
method: 'getVoteAccounts',
params: [],
id: 1,
}),
});
const data = await response.json();
console.log(data);
Response
Vote Accounts Response
Vote Accounts Response
object current
* array items
object activatedStake
* integer commission
* integer epochCredits
* array items
array items
integer epochVoteAccount
* boolean lastVote
* integer nodePubkey
* string rootSlot
* integer votePubkey
* string additionalProperties
none delinquent
* array items
object activatedStake
* integer commission
* integer epochCredits
* array items
array items
integer epochVoteAccount
* boolean lastVote
* integer nodePubkey
* string rootSlot
* integer votePubkey
* string additionalProperties
none additionalProperties
none JSON
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"current": [
{
"activatedStake": 42,
"commission": 0,
"epochCredits": [
[1, 64, 0],
[2, 192, 64]
],
"epochVoteAccount": true,
"lastVote": 147,
"nodePubkey": "B97CCUW3AEZFGy6uUg6zUdnNYvnVq5VG8PUtb2HayTDD",
"rootSlot": 86,
"votePubkey": "3ZT31jkAGhUaw8jsy4bTknwBMP8i4Eueh52By4zXcsVw"
}
],
"delinquent": []
}