Docs

unsubscribe_newHead - Bittensor RPC Method

Cancel a legacy new head subscription on Bittensor via WebSocket.

Legacy alias for chain_unsubscribeNewHeads. Cancels a WebSocket subscription that was started with subscribe_newHead (or chain_subscribeNewHeads). Provide the subscription ID that was returned when the subscription was created. Modern clients should use chain_unsubscribeNewHeads instead.

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": "unsubscribe_newHead",
    "params": ["SUBSCRIPTION_ID"],
    "id": 1
  }'

Use Cases

  • Legacy client compatibility -- Support older clients or libraries that use this alias name for unsubscribing.
  • Subscription cleanup -- Cancel new-head notifications when no longer needed.

Notes

  • This is a legacy alias. Modern clients should use chain_unsubscribeNewHeads.
  • Always unsubscribe when done to free server-side resources.
  • WebSocket-only; not available over HTTP.