Docs

chainHead_v1_unfollow - Bittensor RPC Method

Stop following the chain head and clean up a follow subscription on Bittensor using the new JSON-RPC v2 spec.

Stops a chain head follow subscription that was started with chainHead_v1_follow. This cancels all in-progress operations, unpins all blocks, and frees all server-side resources associated with the subscription. Always call this method when you are done following the chain head to avoid resource leaks.

Parameters

ParameterTypeRequiredDescription
followSubscriptionstringYesThe subscription ID returned by chainHead_v1_follow.

Response

FieldTypeDescription
resultbooleanIndicates whether the follow subscription was successfully stopped. No further events will be delivered.

Code Examples

Use Cases

  • Graceful shutdown -- Clean up the follow subscription before disconnecting your WebSocket client.
  • Subscription rotation -- Stop the current subscription and start a new one (e.g. after a stop event indicating too many pinned blocks).
  • Resource management -- Free server resources when your application no longer needs real-time block notifications.

Notes

  • After calling unfollow, the subscription ID becomes invalid and all associated operations are cancelled.
  • If the server already sent a stop event, the subscription is already terminated, but calling unfollow is still safe and recommended for clean client-side state management.
  • This method is experimental and may not be enabled on public shared RPC endpoints.