# rootSubscribe

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

#### Parameters required for this RPC call

* No parameters required.

{% tabs %}
{% tab title="Websocket" %}

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "rootSubscribe"
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
  "jsonrpc": "2.0",
  "result": 0,
  "id": 1
}
```

{% endtab %}
{% endtabs %}

**Notification Format:**

The result is the latest root slot number.

{% tabs %}
{% tab title="Notification Format" %}

```json
{
  "jsonrpc": "2.0",
  "method": "rootNotification",
  "params": {
    "result": 42,
    "subscription": 0
  }
}
```

{% endtab %}
{% endtabs %}
