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

# programUnsubscribe | Solana

> Cancel a Solana program subscription with programUnsubscribe. Stop receiving real-time WebSocket notifications for program-owned account changes.

See also [programSubscribe | Solana](https://docs.chainstack.com/reference/programsubscribe-solana.md).

## Parameters

* `integer` - The ID of the subscription that you want to cancel. This is the subscription ID that was returned when calling `programSubscribe`.

## Response

* `boolean` - A boolean value indicating if the subscription was removed successfully. `true` if removed successfully, `false` if not.

## `programUnsubscribe` code examples

> [!NOTE]
>
> Note that subscriptions require a WebSocket connection. You can use a WebSocket client library for your programming language of choice to interact with Solana's WebSocket API.

```shell wscat theme={"system"}
$ wscat -c YOUR_CHAINSTACK_WEBSOCKET_ENDPOINT
# Wait for the connection to be established

Connected (press CTRL+C to quit)
> {"jsonrpc":"2.0","id":1,"method":"programUnsubscribe","params":[0]}
```
