state_unsubscribeRuntimeVersion - Bittensor RPC Method
Cancel a runtime version subscription on Bittensor via WebSocket.
Bittensor RPC endpoint: endpoint URLs, plans and pricing.
Cancels a WebSocket subscription that was started with state_subscribeRuntimeVersion. After calling this method, no further runtime version notifications will be delivered for that subscription. Provide the subscription ID that was returned when the subscription was created.
wscat -c wss://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY \
-x '{
"jsonrpc": "2.0",
"method": "state_unsubscribeRuntimeVersion",
"params": ["SUBSCRIPTION_ID"],
"id": 1
}'Code Examples
This method requires a WebSocket connection and is not available over HTTP.
WebSocket (wscat)
wscat -c wss://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY \
-x '{
"jsonrpc": "2.0",
"method": "state_unsubscribeRuntimeVersion",
"params": ["SUBSCRIPTION_ID"],
"id": 1
}'Use Cases
- Subscription cleanup -- Cancel the runtime version subscription when your application no longer needs to track runtime upgrades.
- Resource management -- Free server-side resources in long-running WebSocket applications.
- Subscription rotation -- Stop an existing subscription before starting a new one after reconnection.
Notes
- Always unsubscribe when done to prevent server-side resource leaks.
- The
chain_unsubscribeRuntimeVersionmethod in thechainnamespace serves the same purpose if the subscription was started withchain_subscribeRuntimeVersion. - WebSocket-only; cannot be called over HTTP.
Related Methods
state_subscribeRuntimeVersion-- Start the subscription this method cancelschain_subscribeRuntimeVersion-- Subscribe via the chain namespacestate_unsubscribeStorage-- Cancel a storage subscriptionchain_getRuntimeVersion-- One-shot query for current runtime version