> ## 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.

# slotSubscribe

> 검증자가 슬롯을 처리할 때마다 알림을 받기 위해 구독하세요.

## Endpoints

Websockets는 다음 URL로 메인넷과 디브넷에서 사용할 수 있습니다:

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

<Note>Websockets는 10분 비활성 타이머가 있습니다; 웹소켓 연결을 지속하기 위해 건강 검진을 구현하고 매분 핑을 보내는 것이 강력히 권장됩니다.</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

알림은 다음 필드를 가진 객체입니다:

* `parent: <u64>` - 상위 슬롯
* `root: <u64>` - 현재 루트 슬롯
* `slot: <u64>` - 새로 설정된 슬롯 값

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

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

  ```json Notification theme={"system"}
  {
    "jsonrpc": "2.0",
    "method": "slotNotification",
    "params": {
      "result": {
        "parent": 75,
        "root": 44,
        "slot": 76
      },
      "subscription": 0
    }
  }
  ```
</ResponseExample>
