# getVoteAccounts

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

#### Parameters required for this RPC call

* **configuration** : This contains the following parameters, all are optional fields.
  * **commitment**: The commitment describes how finalized a block is at that point in time. Commitment levels <mark style="color:yellow;">processed</mark>, <mark style="color:yellow;">confirmed</mark> and <mark style="color:yellow;">finalized</mark> are supported, defaults to <mark style="color:yellow;">finalized</mark>.
  * **votePubkey**: Only return results for this validator vote address (base-58 encoded)
  * **keepUnstakedDeliquents**: Do not filter out delinquent validators with no stake
  * **delinquentSlotDistance**: 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.*

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

<pre class="language-bash"><code class="lang-bash">curl https://rpc.shyft.to?api_key=YOUR-API-KEY -s -X \
<strong>  POST -H "Content-Type: application/json" -d ' 
</strong>   {
     "jsonrpc": "2.0",
     "id": 1,
     "method": "getVoteAccounts",
     "params": [
       {
         "commitment": "finalized",
         "votePubkey": "i7NyKBMJCA9bLM2nsGyAGCKHECuR2L5eh4GqFciuwNT"
       }
     ]
   }
 '
</code></pre>

{% endtab %}

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

```javascript
import { Connection, PublicKey, clusterApiUrl, type GetVersionedTransactionConfig, } from "@solana/web3.js";

const connection = new Connection("https://rpc.shyft.to?api_key=YOUR-API-KEY", "confirmed");

let version = await connection.getVoteAccounts();

console.log(version);
```

{% endtab %}

{% tab title="Response" %}

```json
{
  "jsonrpc": "2.0",
  "result": {
    "current": [
      {
        "activatedStake": 38263229364446900,
        "commission": 95,
        "epochCredits": [
          [902, 1383125544, 1376213656],
          [903, 1390037304, 1383125544],
          [904, 1396949288, 1390037304],
          [905, 1403861272, 1396949288],
          [906, 1406766600, 1403861272]
        ],
        "epochVoteAccount": true,
        "lastVote": 391573587,
        "nodePubkey": "dv2eQHeP4RFrJZ6UeiZWoc3XTtmtZCUKxxCApCDcRNV",
        "rootSlot": 391573556,
        "votePubkey": "i7NyKBMJCA9bLM2nsGyAGCKHECuR2L5eh4GqFciuwNT"
      }
    ],
    "delinquent": []
  },
  "id": 1
}
```

{% endtab %}
{% endtabs %}
