Overview
The Market Data API provides access to market data via both HTTP and WebSocket/TCP protocols. Our focus is on historical and real-time data, enabling developers to efficiently integrate these APIs into their applications.
The Market Data API is divided into the Data API and the Data Streaming API. The Data API uses the HTTP protocol and is mainly for developers to pull historical and latest market data. The Data Streaming API uses MQTT protocol based on TCP/WebSocket for pushing real-time market data.
To simplify integration, we provide SDKs in Python. These SDKs offer comprehensive encapsulation of authentication interfaces, allowing developers to get started quickly. For details on how to install the SDK, please refer to the Installation Guide.
Market API Overview
| Function | Protocol | Description |
|---|---|---|
| Get Instrument | HTTP | Query underlying information based on a list of security symbols and securities. Each App Key is limited to one call per second |
| Historical Bars (single symbol) | HTTP | Supports historical candlestick bars data at various granularities such as M1, M5, etc.; currently, daily candlestick bars and above only provide forward-adjusted candlestick bars data, while minute candlestick bars data only provides non-adjusted candlestick bars data |
| Historical Bars | HTTP | candlestick bars batch query supports historical candlestick bars data at various granularities such as M1, M5, etc.; currently, daily candlestick bars and above only provide forward-adjusted candlestick bars data, while minute candlestick bars data only provides non-adjusted candlestick bars data |
| Snapshot | HTTP | Real-time market snapshot data interface for securities, supporting queries for multiple security types such as US stocks, Hong Kong stocks, etc. |
| Quotes | HTTP | Interface for retrieving the latest order book data of securities. Returns order book information at specified depth, including price, quantity, order details, etc. |
| Tick | HTTP | Interface for retrieving tick-by-tick transaction data of securities. Returns detailed tick-by-tick transaction records for specified securities within a specified time range |
| Subscribe | HTTP | Market data subscription interface. After the market data push MQTT connection is successfully established, call this interface to subscribe to real-time market data push notifications |
| Unsubscribe | HTTP | Unsubscribe interface. After the market data push MQTT connection is successfully established, call this interface to unsubscribe from real-time market data push notifications |