# WEBSOCKET API

- [Websocket订阅地址说明](https://docs.infoway.io/websocket-api/endpoints.md)
- [Websocket代码示例](https://docs.infoway.io/websocket-api/code-examples.md): WebSocket代码示例，获取实时成交明细、盘口、k线。包括自动重连，心跳检测机制。
- [Websocket 订阅方法](https://docs.infoway.io/websocket-api/subscribe-and-unsubscribe.md): 包括所有Websocket的订阅以及取消订阅的入参、出餐
- [实时成交明细（Trade）订阅](https://docs.infoway.io/websocket-api/subscribe-and-unsubscribe/trade-subscribe.md)
- [实时K线（Candles）订阅](https://docs.infoway.io/websocket-api/subscribe-and-unsubscribe/candles-subscribe.md)
- [实时买卖盘口（Depth）订阅](https://docs.infoway.io/websocket-api/subscribe-and-unsubscribe/depth-subscribe.md)
- [Websocket取消订阅](https://docs.infoway.io/websocket-api/unsubscribe.md): 该文档描述了如果通过Websocket参数取消实时成交明细、盘口、K线的订阅请求
- [实时成交明细（Trade）取消订阅](https://docs.infoway.io/websocket-api/unsubscribe/trade-subscribe.md)
- [实时买卖盘口（Depth）取消订阅](https://docs.infoway.io/websocket-api/unsubscribe/trade-subscribe-1.md): Depth
- [实时K线（Candles）取消订阅](https://docs.infoway.io/websocket-api/unsubscribe/trade-subscribe-2.md): 展示如何在不断开Websocket连接的情况下，全量取消或者只取消一部分产品订阅
- [心跳机制](https://docs.infoway.io/websocket-api/heartbeat.md)


---

# 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://docs.infoway.io/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.
