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

# rootSubscribe

> 검증자가 새로운 루트를 설정할 때마다 알림을 받기 위해 구독합니다.

## Endpoints

Websockets은 다음 URL로 mainnet 및 devnet에서 사용할 수 있습니다:

* **Mainnet** `wss://mainnet.helius-rpc.com/?api-key=<api-key>`
* **Devnet** `wss://devnet.helius-rpc.com/?api-key=<api-key>`

<Note>Websockets은 10분 비활성화 타이머가 있습니다; 웹소켓 연결을 유지하기 위해 매분 ping을 보내고 상태를 확인하는 것을 강력히 권장합니다.</Note>

## Authorizations

<ParamField query="api-key" type="string" required>
  귀하의 Helius API 키. [대시보드](https://dashboard.helius.dev/api-keys)에서 무료로 얻을 수 있습니다.
</ParamField>

## Body

<ParamField body="params" type="array">
  <Expandable title="properties" defaultOpen>
    <ParamField body="none" type="null">
      매개변수가 필요하지 않습니다.
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="result" type="integer">
  구독 취소에 필요한 구독 ID
</ResponseField>

## Notification Format

결과는 최신 루트 슬롯 번호입니다.

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

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

  ```json Notification theme={"system"}
  {
    "jsonrpc": "2.0",
    "method": "rootNotification",
    "params": {
      "result": 42,
      "subscription": 0
    }
  }
  ```
</ResponseExample>
