> ## 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.

# slotsUpdatesUnsubscribe | Solana

> Cancel a Solana slots updates subscription with slotsUpdatesUnsubscribe. Stop receiving detailed WebSocket notifications for slot processing stages.

See also [slotsUpdatesSubscribe | Solana](/reference/slotsupdatessubscribe-solana).

## Parameters

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

## Response

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

## `slotsUpdatesUnsubscribe` code examples

<Info>
  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.
</Info>

<CodeGroup>
  ```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":"slotsUpdatesUnsubscribe","params":[0]}
  ```
</CodeGroup>

## Use case

The `slotsUpdatesUnsubscribe` method is important for proper resource management in applications that use slots updates subscriptions. Common use cases include:

* Cleanup: Remove detailed slot monitoring when no longer needed
* Resource optimization: Free up resources by unsubscribing from unused slot update notifications
* Connection management: Clean up subscriptions during WebSocket disconnections
* Monitoring rotation: Remove old monitoring subscriptions when establishing new ones

By properly managing slots updates subscriptions through unsubscribe calls, applications can maintain optimal performance and prevent unnecessary resource usage.
