# Market Data API Overview

The Market Data API provides access to real-time and historical market data for Hong Kong stocks, US stocks, and China A-shares. It supports two access patterns:

- **Data API** — HTTP-based requests for historical and snapshot data. Ideal for backtesting, analysis, and on-demand queries. See [Data API](data-api.md).
- **Data Streaming API** — Real-time data push via MQTT protocol over WebSocket/TCP. Ideal for live trading strategies and real-time monitoring. See [Data Streaming API](data-streaming-api.md).

:::tip
The Webull SDK simplifies integration by handling authentication and protocol details. See [SDKs and Tools](../sdk.md) for installation.
:::

## Supported Markets and Products

| Market | Product |
|--------|---------|
| Hong Kong | Stocks, ETFs |
| US | Stocks, ETFs |
| US | Options |
| US | Futures (CBOT, CME, COMEX, NYMEX) |
| US | Overnight Session |
| US | Order Flow (Footprint, TPO) |
| China Mainland | A-Shares (Stock Connect) |

## Available Endpoints

### Market Data

| Endpoint | Protocol | Description |
|----------|----------|-------------|
| [Snapshot](../reference/snapshot.api.mdx) | HTTP | Real-time market snapshot with latest price, price change, volume, turnover rate, etc. Supports pre-market, after-hours, and overnight data |
| [Quotes Depth](../reference/quotes.api.mdx) | HTTP | Latest bid/ask data at specified depth, including price, quantity, and order details |
| [Tick](../reference/tick.api.mdx) | HTTP | Tick-by-tick trade records including time, price, volume, and direction. Sorted latest first |
| [Historical Bars (Single Symbol)](../reference/bars.api.mdx) | HTTP | OHLCV candlestick data at various granularities (M1, M5, D, etc.). Daily and above: forward-adjusted; minute bars: unadjusted |
| [Historical Bars (Batch)](../reference/historical-bars.api.mdx) | HTTP | Batch query for multiple symbols. Same granularity and adjustment rules as single symbol |
| [Footprint](../reference/footprint.api.mdx) | HTTP | Query the most recent N footprint records based on stock symbol, and category, time granularity. |

### Instruments

| Endpoint | Protocol | Description |
|----------|----------|-------------|
| [Get Instruments](../reference/instrument-list.api.mdx) | HTTP | Get security information for one or more instruments |

### Real-Time Streaming

| Endpoint | Protocol | Description |
|----------|----------|-------------|
| [Subscribe](../reference/subscribe.api.mdx) | HTTP | Subscribe to real-time market data push via MQTT |
| [Unsubscribe](../reference/unsubscribe.api.mdx) | HTTP | Unsubscribe from real-time market data push |

## Market Data Permissions

| Market | Category | How to Access |
|--------|----------|---------------|
| US Market | Stocks, ETFs | Subscribe Nasdaq Basic (free) or Nasdaq Totalview for 50-level depth |
| US Market | Options | Subscribe OPRA Real-Time for options last sale and quotation |
| US Market | Futures | Subscribe CBOT / CME / COMEX / NYMEX individually or CME Group bundle |
| US Market | Overnight Session | Subscribe Overnight Consolidated Level 2 for real-time 50-level depth |
| US Market | Order Flow | Subscribe Order Flow for Footprint and Time Price Opportunity indicators |
| Hong Kong Market | Stocks, ETFs | LV1 data is free. For LV2 data, purchase HKEX Level 2 (Global Edition) on the [Webull website](https://www.webullapp.hk/center/mall/) |
| China Mainland | A-Shares (Stock Connect) | LV1 data is free (15-minute delay outside Mainland China; not available in Mainland China) |

:::caution
Market data subscriptions purchased through the Webull mobile app or desktop platform (QT) are independent of OpenAPI. You need a separate subscription specifically enabled for OpenAPI usage. Only one device may access LV1/LV2 data at any one time. For details on how to subscribe, see [Subscribe Advanced Quotes](subscribe-quotes.md).
:::
