> ## Documentation Index
> Fetch the complete documentation index at: https://www.helius.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# voteSubscribe

> voteSubscribe streams Solana votes as they are observed in gossip. These votes are pre-consensus, so there is no guarantee they will ever enter the ledger.

> [!NOTE]
>
> This subscription is unstable and only available if the validator was started with the `--rpc-pubsub-enable-vote-subscription` flag. The format of this subscription may change in the future.

> [!WARNING]
>
> This is an unstable RPC method that **Helius does not support**. This documentation is provided for reference only.

## Endpoints

Websockets are available on mainnet and devnet with the following URLs:

* **Mainnet** `wss://mainnet.helius-rpc.com/?api-key=<api-key>`
* **Devnet** `wss://devnet.helius-rpc.com/?api-key=<api-key>`

> [!NOTE]
>
> Websockets have a 10-minute inactivity timer; implementing health checks and sending pings every minute is heavily recommended to keep the websocket connection alive.

## Authorizations

**api-key** `string` *required*

Your Helius API key. You can get one for free in the [dashboard](https://dashboard.helius.dev/api-keys).

## Body

**params** `array`

**properties**

**none** `null`

No parameters required.

## Response

**result** `integer`

Subscription id (needed to unsubscribe)

## Notification Format

The notification will be an object with the following fields:

* `hash: <string>` - The vote hash
* `slots: <array>` - The slots covered by the vote, as an array of u64 integers
* `timestamp: <i64|null>` - The timestamp of the vote
* `signature: <string>` - The signature of the transaction that contained this vote
* `votePubkey: <string>` - The public key of the vote account, as base-58 encoded string

```json Request theme={"system"}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "voteSubscribe"
}
```

```json Response theme={"system"}
{
  "jsonrpc": "2.0",
  "result": 0,
  "id": 1
}
```

```json Notification theme={"system"}
{
  "jsonrpc": "2.0",
  "method": "voteNotification",
  "params": {
    "result": {
      "hash": "8Rshv2oMkPu5E4opXTRyuyBeZBqQ4S477VG26wUTFxUM",
      "slots": [1, 2],
      "timestamp": null
    },
    "subscription": 0
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.