Docs

subscribe_newHead - Bittensor RPC Method

Legacy alias for subscribing to new block headers on Bittensor via WebSocket.

Legacy alias for chain_subscribeNewHeads. Subscribes to new block headers via a WebSocket connection, emitting a notification each time a new best block is imported. Modern clients should use chain_subscribeNewHeads instead.

The initial JSON-RPC response returns a subscription ID. New-head payloads are delivered afterward as WebSocket notifications on that subscription.

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

Use Cases

  • Legacy client compatibility -- Support older clients or libraries that use this alias name.
  • Real-time block tracking -- Receive notifications for each new best block header as it is imported.

Notes

  • This is a legacy alias. Modern clients should use chain_subscribeNewHeads.
  • Cancel with unsubscribe_newHead or chain_unsubscribeNewHeads.
  • WebSocket-only; not available over HTTP.
  • Dwellir-hosted Bittensor endpoints currently return -32603 Internal error for this legacy alias in live checks, so prefer chain_subscribeNewHeads for production integrations.