Get you own node endpoint today
Start for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.Parameters
integer
- The ID of the subscription that you want to cancel. This is the subscription ID that was returned when callingslotsUpdatesSubscribe
.
Response
boolean
- A boolean value indicating if the subscription was removed successfully.true
if removed successfully,false
if not.
slotsUpdatesUnsubscribe
code examples
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.
Use case
TheslotsUpdatesUnsubscribe
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