Interface Description
This interface supports subscription to the latest order book (real-time tick-by-tick depth, Order Book) data of products. It does not support historical order book data or historical tick-by-tick data. Interface behavior: for each WebSocket connection, every time this request is sent, the backend overwrites the previous subscription request by default. For example, if you initially subscribed to products A, B, and C, and want to add E, F, and G, you need to resend A, B, C, E, F, and G together. After the subscription succeeds, data will be pushed. Notes:- After a subscription succeeds once, you do not need to frequently initiate subscription requests again. You must send a heartbeat every 10 seconds, and the interface will push data in real time. If no heartbeat request is received within 30 seconds, it will be considered timed out and the requester’s WebSocket connection will be disconnected.
- During integration, customers can add automatic reconnection logic to ensure the connection can automatically reconnect after disconnection caused by network or other reasons.
- The following is the maximum order book depth for each product type:
Interface Limitations
- Be sure to read: WebSocket Interface Limitations
- Be sure to read: Error Code Description
API Endpoints
1. US Stocks, Hong Kong Stocks, A Shares, and Major Index Data API Endpoint:- Base Path:
/quote-stock-b-ws-api - Full URL:
wss://quote.alltick.co/quote-stock-b-ws-api
- Base Path:
/quote-b-ws-api - Full URL:
wss://quote.alltick.co/quote-b-ws-api
Request Examples
1. Request example for US Stocks, Hong Kong Stocks, A Shares, and Major Index Data: Each time a connection is established, your authentication token must be appended to the URL as follows:wss://quote.alltick.co/quote-stock-b-ws-api?token=your_token
After the connection succeeds, you can subscribe to specific stock market data as needed. For detailed calling methods, refer to the documentation below.
2. Request example for Forex, Precious Metals, Cryptocurrencies, Crude Oil, CFD Indices, and Commodities:
Each time a connection is established, your authentication token must be appended to the URL as follows:
wss://quote.alltick.co/quote-b-ws-api?token=your_token
After the connection succeeds, you can subscribe to specific forex, cryptocurrency, precious metals, and commodity data as needed. For detailed calling methods, refer to the documentation below.
Request - Protocol Number: 22002
JSON Definition
Symbol Definition
Data Structure (JSON)
Response - Protocol Number: 22003
Data Structure (JSON)
Push - Protocol Number: 22999
Data Definition
Bids Definition
Asks Definition
Data Structure (JSON)
AllTick Website
Official website: https://alltick.co/