# Websocket API

- [Websocket 请求示例](https://apis.alltick.co/websocket-api/websocket-request-example.md): Websocket 请求示例  Websocket 行情 API 地址说明
- [Websocket接口API](https://apis.alltick.co/websocket-api/stock-websocket-interface-api.md): 心跳 最新盘口(实时逐笔深度、Order Book)订阅 最新成交价(实时逐笔Tick数据、当前价、最新价)批量订阅 取消报价订阅
- [最新成交价(实时逐笔Tick数据、当前价、最新价)批量订阅](https://apis.alltick.co/websocket-api/stock-websocket-interface-api/transaction-quote-subscription.md): 该接口支持批量订阅产品的最新成交价(实时逐笔Tick数据，也是当前价、最新价)，不支持历史成交价格(历史逐笔tick数据)。 该接口特性为对于每一个websocket连接，每发送一次该请求，后台会默认覆盖上一次订阅请求（例如，如果您最初订阅了A、B、C这三只产品，想要追加订阅E、F、G，则需要重新发送一次A、B、C、E、F、G），订阅成功后会进行推送数据。 注意： 1、订阅一次成功后，不需要再频繁
- [最新盘口(实时逐笔深度、Order Book)订阅](https://apis.alltick.co/websocket-api/stock-websocket-interface-api/handicap-quote-subscription.md): 该接口支持订阅产品的最新盘口(实时逐笔深度、Order Book)数据，不支持历史盘口和历史逐笔tick数据。 该接口特性：对于每一个websocket连接，每发送一次该请求，后台会默认覆盖上一次订阅请求（例如，如果您最初订阅了A、B、C这三只产品，想要追加订阅E、F、G，则需要重新发送一次A、B、C、E、F、G），订阅成功后会进行推送数据。 注意： 1、订阅一次成功后，不需要再频繁的发起订阅请求
- [取消报价订阅](https://apis.alltick.co/websocket-api/stock-websocket-interface-api/cancel-quote-subscription.md): 接口说明 取消报价订阅 请求-协议号：22006 data定义 数据结构(json)
- [心跳](https://apis.alltick.co/websocket-api/stock-websocket-interface-api/ping-pong.md): 接口说明 要求请求者每10秒发送一次，在30秒内如果没有收到心跳请求，就会认为超时，断开请求者的websocket连接 请求-协议号：22000 数据结构(json)
- [K线推送(不支持)](https://apis.alltick.co/websocket-api/stock-websocket-interface-api/ping-pong-1.md): K线推送说明 Alltick的WebSocket接口不支持K线数据的推送。由于许多客户对此有疑问，特此说明：无论是历史K线还是实时K线，目前仅支持通过HTTP接口直接获取。推荐的实现方式如下： 实现方式建议（仅供参考）： 1、定时拉取K线：为了实现K线的快速更新，建议购买高请求频率的套餐，以提高拉取频率。 2、结合使用HTTP接口：建议客户将/kline和/batch-kline两个接口结合使用，


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apis.alltick.co/websocket-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
