Docs

state_unsubscribeRuntimeVersion - Bittensor RPC Method

Cancel a runtime version subscription on Bittensor via WebSocket.

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.

Code Examples

This method requires a WebSocket connection and is not available over HTTP.

WebSocket (wscat)

Bash
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_unsubscribeRuntimeVersion method in the chain namespace serves the same purpose if the subscription was started with chain_subscribeRuntimeVersion.
  • WebSocket-only; cannot be called over HTTP.