> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thornode.io/llms.txt
> Use this file to discover all available pages before exploring further.

# rootSubscribe

> Subscribe to receive notification anytime a new root is set by the validator.

Subscribe to receive notification anytime a new root is set by the validator.

## On ThorNode

Send over the complete `wss://` URL copied from the dashboard. Each active subscription counts toward the per-token cap; over the cap the request is answered with `-32005 subscription limit exceeded` and not forwarded. Frames pass through unchanged.

## Parameters

<ParamField body="params" type="array">
  <Expandable title="properties" defaultOpen>
    <ParamField body="none" type="null">
      No parameters required.
    </ParamField>
  </Expandable>
</ParamField>

## Notification format

The result is the latest root slot number.

## Response

<ResponseField name="result" type="integer">
  Subscription id (needed to unsubscribe)
</ResponseField>

<RequestExample>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "rootSubscribe",
    "params": []
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "result": 3083,
    "id": 1
  }
  ```

  ```json Notification 1 theme={null}
  {
    "jsonrpc": "2.0",
    "method": "rootNotification",
    "params": {
      "result": 439749506,
      "subscription": 3083
    }
  }
  ```

  ```json Notification 2 theme={null}
  {
    "jsonrpc": "2.0",
    "method": "rootNotification",
    "params": {
      "result": 439749507,
      "subscription": 3083
    }
  }
  ```
</ResponseExample>
