Skip to main content

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 WebSocket/TCP 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 SDKs and Tools.

Market API Overview

TypeFunctionProtocolDescriptionThreshold
Stock QuotesTickHTTPInterface for retrieving tick-by-tick transaction data of securities. Returns detailed tick-by-tick transaction records for specified securities within a specified time range300/60s
SnapshotHTTPReal-time market snapshot data interface for securities, supporting queries for multiple security types such as US stocks, Hong Kong stocks, etc.
QuotesHTTPInterface for retrieving the latest order book data of securities. Returns order book information at specified depth, including price, quantity, order details, etc.
Historical Bars (single symbol)HTTPSupports 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 BarsHTTPcandlestick 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
Futures QuotesTickHTTPReturns time, price, volume, and direction of individual trades for a futures contract within a specified time range, sorted latest-first
SnapshotHTTPReturns real-time key indicators (e.g., latest price, change, volume, turnover rate) for a futures contract
QuotesHTTPFetch the latest bid/ask data for a futures contract at a specified depth, including price and quantity
Historical BarsHTTPBatch query for recent N bars of futures data by symbol, granularity (e.g., M1, M5), and type.
Crypto QuotesSnapshotHTTPFetch real-time market snapshots for up to 20 crypto symbols, including latest price, change, % change, bid/ask quotes, and other key metrics
Historical BarsHTTPFetch historical candlestick data for a crypto symbol across intervals (M1, M5, H1, D, etc.). Daily+ bars are forward-adjusted; minute bars are unadjusted. Returns 1–1200 most recent bars
StreamingSubscribeHTTPMarket 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/
UnsubscribeHTTPUnsubscribe interface. After the market data push MQTT connection is successfully established, call this interface to unsubscribe from real-time market data push notifications

Usage Fees

Market Data:

MarketCategoryPermission Acquisition
US MarketSecurities Products (Stocks, ETFs, Night Session)To obtain permission to access U.S. stock market data, please purchase Level 1 and Level 2 market data for U.S. stock.
Note:Subscriptions in QT or the mobile app are independent of OpenAPI. You need a separate data subscription specifically enabled for OpenAPI usage. Only one device may access LV1 and LV2 at any one time.
US MarketFuturesNot supported yet. Coming soon.
US MarketCrypto