> For the complete documentation index, see [llms.txt](https://en.apis.alltick.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://en.apis.alltick.co/websocket-api.md).

# Websocket API

- [Websocket request example](https://en.apis.alltick.co/websocket-api/websocket-request-example.md): Websocket request example
- [Websocket Interface API](https://en.apis.alltick.co/websocket-api/websocket-interface-api.md)
- [Latest Trade Price (Real-time Tick Data) Batch Subscription](https://en.apis.alltick.co/websocket-api/websocket-interface-api/transaction-quote-subscription.md): This API supports batch subscription to real-time trade prices (tick-by-tick data、Latest Price) but does not provide historical trade prices. Each WebSocket connection allows one active subscription
- [Order Book (Real-time Tick-by-Tick, Market Depth) Subscription](https://en.apis.alltick.co/websocket-api/websocket-interface-api/handicap-quote-subscription.md): This interface supports subscribing to the latest market depth (real-time tick-by-tick, Order Book) data for products, but does not support historical market depth or historical tick data. Interface
- [Cancel quote subscription](https://en.apis.alltick.co/websocket-api/websocket-interface-api/cancel-quote-subscription.md): Cancel quote subscription Request - Protocol Number：22006 Data definition Data Structure (JSON)
- [Ping Pong](https://en.apis.alltick.co/websocket-api/websocket-interface-api/ping-pong.md): The requester is required to send a heartbeat request every 10 seconds. If no heartbeat request is received within 30 seconds, it will be considered a timeout, and the requester's WebSocket connection
- [K-line push (not supported)](https://en.apis.alltick.co/websocket-api/websocket-interface-api/ping-pong-1.md): K-line Push Explanation Alltick's WebSocket interface does not support K-line data push. Both historical and real-time K-lines can only be accessed through the HTTP interface. Recommended implementati


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
