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

# slotsUpdatesSubscribe

> 각 슬롯의 다양한 업데이트에 대해 검증자로부터 알림을 수신하기 위해 구독합니다.

<Note>
  이 구독은 불안정합니다. 이 구독의 형식은 미래에 변경될 수 있으며, 항상 지원되지 않을 수 있습니다.
</Note>

## Endpoints

웹소켓은 메인넷과 devnet에서 다음 URL로 사용 가능합니다:

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

<Note>웹소켓은 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

알림은 다음 필드를 포함하는 객체가 될 것입니다:

* `err: <string|undefined>` - 오류 메시지. 업데이트가 "dead" 유형인 경우에만 존재합니다.
* `parent: <u64|undefined>` - 부모 슬롯. 업데이트가 "createdBank" 유형인 경우에만 존재합니다.
* `slot: <u64>` - 새로 업데이트된 슬롯
* `stats: <object|undefined>` - 업데이트가 "frozen" 유형인 경우에만 존재합니다. 다음 필드를 포함하는 객체:
  * `maxTransactionsPerEntry: <u64>`
  * `numFailedTransactions: <u64>`
  * `numSuccessfulTransactions: <u64>`
  * `numTransactionEntries: <u64>`
* `timestamp: <i64>` - 업데이트의 Unix 타임스탬프 (밀리초 단위)
* `type: <string>` - 업데이트 유형, 다음 중 하나:
  * "firstShredReceived"
  * "completed"
  * "createdBank"
  * "frozen"
  * "dead"
  * "optimisticConfirmation"
  * "root"

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

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

  ```json Notification theme={"system"}
  {
    "jsonrpc": "2.0",
    "method": "slotsUpdatesNotification",
    "params": {
      "result": {
        "parent": 75,
        "slot": 76,
        "timestamp": 1625081266243,
        "type": "optimisticConfirmation"
      },
      "subscription": 0
    }
  }
  ```
</ResponseExample>
