chain_unsubscribeNewHead - Bittensor RPC Method
Cancel a chain_subscribeNewHead subscription on Bittensor (singular alias). WebSocket-only.
Cancels a WebSocket subscription that was started with chain_subscribeNewHead (singular form, a legacy alias). This is functionally identical to chain_unsubscribeNewHeads and exists for backward compatibility. Provide the subscription ID returned when the subscription was created.
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": "chain_unsubscribeNewHead",
"params": ["SUBSCRIPTION_ID"],
"id": 1
}'Use Cases
- Legacy client support -- Used by older clients or libraries that reference the singular form of the method name.
- Subscription cleanup -- Cancel a new-head subscription when you no longer need real-time block notifications.
Notes
- This is a legacy alias. Modern clients should use
chain_unsubscribeNewHeads(plural). - Always unsubscribe when you are done to free server-side resources.
- WebSocket-only; cannot be called over HTTP.
Related Methods
chain_unsubscribeNewHeads-- Canonical (plural) form of this methodchain_subscribeNewHeads-- Start a new-head subscriptionchain_unsubscribeAllHeads-- Cancel an all-heads subscriptionchain_unsubscribeFinalizedHeads-- Cancel a finalized-heads subscription