---
title: voteUnsubscribe
description: Cancel a voteSubscribe websocket subscription.
url: /docs/rpc/websocket/voteunsubscribe
type: reference
hideTableOfContents: true
---

Cancel an existing [voteSubscribe](/docs/rpc/websocket/votesubscribe)
subscription.

<Callout type="info" title="Source">
  [`vote_unsubscribe`](https://github.com/anza-xyz/agave/blob/v3.1.8/rpc/src/rpc_pubsub.rs#L589)
</Callout>

<Callout type="warn">
  This method is only available when vote subscriptions are enabled on the
  validator.
</Callout>

<APIMethod>

```jsonc !!request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "voteUnsubscribe",
  "params": [0]
}
```

### !params

#### !! subscription id

!type integer  
!required

Subscription id returned by `voteSubscribe`.

### !!result

```jsonc !response
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

!type boolean

Returns `true` if the subscription was removed. Returns an error if the
subscription id is unknown.

</APIMethod>
