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

# ハートビート

> 本ページでは、AllTick株式WebSocket APIのハートビート機構について説明します。Ping-Pongメッセージ例を通じて、長時間接続をオンラインに保つ方法、切断検知、再接続戦略を紹介し、開発者が株式リアルタイムTickと板情報プッシュを購読する際にWebSocket接続を安定して維持し、相場システムの信頼性を高められるよう支援します。

## インターフェース説明

リクエスト元は10秒ごとにハートビートを送信する必要があります。30秒以内にハートビートリクエストを受信しない場合はタイムアウトとみなし、リクエスト元のWebSocket接続を切断します。

## リクエスト - プロトコル番号: 22000

### データ構造（JSON）

```json theme={null}
{
  "cmd_id": 22000,
  "seq_id": 123,
  "trace": "3baaa938-f92c-4a74-a228-fd49d5e2f8bc-1678419657806",
  "data": {}
}
```

## レスポンス - プロトコル番号: 22001

### データ構造（JSON）

```json theme={null}
{
  "ret": 200,
  "msg": "ok",
  "cmd_id": 22001,
  "seq_id": 123,
  "trace": "3baaa938-f92c-4a74-a228-fd49d5e2f8bc-1678419657806",
  "data": {}
}
```

#### AllTickウェブサイト

<Note>
  公式サイト: <a href="https://alltick.co/">[https://alltick.co/](https://alltick.co/)</a>
</Note>

<script src="/seo-keywords.js" />
