> For the complete documentation index, see [llms.txt](https://docs.triton.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.triton.one/solana/rpc-methods/readme/getvoteaccounts.md).

# getVoteAccounts

Returns current and delinquent vote accounts with activatedStake, commission, lastVote, rootSlot and epochCredits, optionally filtered by votePubkey.

## Request

{% tabs %}
{% tab title="cURL" %}

```bash
curl "https://<your-endpoint>.mainnet.rpcpool.com/<your-token>" -s -X POST \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getVoteAccounts",
  "params": [
    {
      "commitment": "finalized",
      "votePubkey": "<vote-account-pubkey>"
    }
  ]
}'
```

{% endtab %}

{% tab title="Kit" %}

```typescript
import { address, createSolanaRpc } from "@solana/kit";

const rpc_url = "https://<your-endpoint>.mainnet.rpcpool.com/<your-token>";
const rpc = createSolanaRpc(rpc_url);

let votePubkey = address("<vote-account-pubkey>");

let voteAccounts = await rpc
  .getVoteAccounts({
    votePubkey
  })
  .send();

console.log(voteAccounts);
```

{% endtab %}

{% tab title="web3.js" %}

```typescript
import { Connection, PublicKey } from "@solana/web3.js";

const connection = new Connection("https://<your-endpoint>.mainnet.rpcpool.com/<your-token>", "confirmed");

// web3.js getVoteAccounts takes only a commitment, so it returns all vote accounts; filter the result by votePubkey.
let voteAccounts = await connection.getVoteAccounts();
let mine = voteAccounts.current.find((v) => v.votePubkey === "<vote-account-pubkey>");

console.log(mine);
```

{% endtab %}

{% tab title="Rust" %}

```rust
// Cargo.toml: anyhow = "1", solana-client = "~4.4", solana-commitment-config = "3",
// tokio = { version = "1", features = ["full"] }.
// Requires Rust 1.98.1 or newer (solana-client 4.4).
use anyhow::Result;
use solana_client::{nonblocking::rpc_client::RpcClient, rpc_config::RpcGetVoteAccountsConfig};
use solana_commitment_config::CommitmentConfig;

#[tokio::main]
async fn main() -> Result<()> {
    let client = RpcClient::new_with_commitment(
        String::from("https://<your-endpoint>.mainnet.rpcpool.com/<your-token>"),
        CommitmentConfig::confirmed(),
    );

    let vote_pubkey = String::from("<vote-account-pubkey>");

    let config = RpcGetVoteAccountsConfig {
        vote_pubkey: Some(vote_pubkey),
        commitment: CommitmentConfig::finalized().into(),
        keep_unstaked_delinquents: None,
        delinquent_slot_distance: None,
    };

    let vote_accounts = client.get_vote_accounts_with_config(config).await?;

    println!("{:#?}", vote_accounts);

    Ok(())
}
```

{% endtab %}
{% endtabs %}

## Parameters

**`config`** · object · optional

Configuration object containing the following fields:

**`commitment`** · string · default `finalized`

Values: `processed`, `confirmed`, `finalized`

Solana RPC uses the following commitment levels:

| Value       | Description                                                                                                                                                                        |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `processed` | Return data from the highest slot this node has processed on the fork it currently considers best. This is the newest view, but it can still change if the cluster switches forks. |
| `confirmed` | Return data from the highest slot the cluster has finalized. On Alpenglow, `confirmed` and `finalized` are the same level.                                                         |
| `finalized` | Return data from the highest slot that the cluster has finalized. On Alpenglow there are no vote towers or lockouts: a slot is finalized by certificates of aggregated votes.      |

**`votePubkey`** · string

Return only entries for this vote account address, as a base-58 encoded string.

**`keepUnstakedDelinquents`** · bool · default `false`

Values: `true`, `false`

Keep delinquent vote accounts even if their activated stake is zero.

**`delinquentSlotDistance`** · u64 · default `128`

Number of slots a validator may trail the selected slot before the RPC node classifies it as delinquent. **Note:** ecosystem tools usually leave this unset to preserve consistent behaviour.

## Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "current": [
      {
        "activatedStake": 17034353881158988,
        "commission": 7,
        "epochCredits": [
          [1071, 19495919626183, 17032766306108],
          [1072, 21945030397590, 19495919626183],
          [1073, 24369876940155, 21945030397590],
          [1074, 26854232539350, 24369876940155],
          [1075, 28399585778820, 26854232539350]
        ],
        "epochVoteAccount": true,
        "inflationRewardsCommissionBps": 700,
        "lastVote": 464671960,
        "nodePubkey": "<validator-identity>",
        "rootSlot": 464671960,
        "votePubkey": "<vote-account-pubkey>"
      }
    ],
    "delinquent": []
  },
  "id": 1
}
```

## Result

Vote-account status object containing `current` and `delinquent` arrays of vote account records.

**`current`** · array

Vote accounts the RPC node classifies as current at the requested commitment.

**`delinquent`** · array

Vote accounts the RPC node classifies as delinquent at the requested commitment.

Each element of `current` and `delinquent` is a vote-account object containing:

| Field                           | Type     | Description                                                                                                  |
| ------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| `activatedStake`                | `u64`    | Stake, in lamports, delegated to this vote account and active in the current epoch.                          |
| `commission`                    | `u8`     | Commission percentage (0-100) used for rewards payout.                                                       |
| `epochCredits`                  | `array`  | Recent history of earned credits for up to five epochs. Each element is `[epoch, credits, previousCredits]`. |
| `epochVoteAccount`              | `bool`   | Whether this vote account is staked for the current epoch.                                                   |
| `inflationRewardsCommissionBps` | `u16`    | Commission in basis points (0-10000) used for rewards payout. Older nodes omit this field.                   |
| `lastVote`                      | `u64`    | Most recent slot this vote account voted on. Returns `0` if no votes exist.                                  |
| `nodePubkey`                    | `string` | Validator identity pubkey, as a base-58 encoded string.                                                      |
| `rootSlot`                      | `u64`    | Current root slot for this vote account. Returns `0` if no root slot exists.                                 |
| `votePubkey`                    | `string` | Vote account pubkey, as a base-58 encoded string.                                                            |

***

*Adapted from the* [*Solana `getVoteAccounts` reference*](https://solana.com/docs/rpc/http/getvoteaccounts)*, maintained by the Solana Foundation.*

***

<i class="fa-life-ring">:life-ring:</i> Contact support by clicking the chat icon in your [customer dashboard](https://customers.triton.one)\ <i class="fa-briefcase">:briefcase:</i> Sales questions? [Contact us](https://triton.one/contact)\ <i class="fa-sparkles">:sparkles:</i> AI agent? Read [llms.txt](https://docs.triton.one/llms.txt)\ <i class="fa-rss">:rss:</i> Follow updates: [Blog](https://blog.triton.one) · [X](https://x.com/triton_one) · [YouTube](https://www.youtube.com/@triton_one_ltd) · [Telegram](https://t.me/tritonone) · [GitHub](https://github.com/rpcpool)
