HK Stock Market Data API

TickDB provides Hong Kong stock quotes, ten-level order books, trades and historical bars via REST and WebSocket, with quote and depth updates during opening auctions.

Market Coverage

Exchange / Category Symbols Data Capabilities Frequency
HK Stocks (HKEX) 3,299
  • Quotes
  • Candlesticks
  • Intraday
  • Order book
  • Trades

Also supports instrument information, adjusted candles and adjustment factors; metrics, capital flow, company financials and events depend on instrument and permissions.

Updates during trading sessions

Candlesticks are queried via REST; live subscriptions use supported channels. Endpoints, fields and historical coverage depend on the instrument, plan permissions and available data. Instrument counts do not imply full capability coverage for every instrument.

Key Hong Kong market-data capabilities

Monitor the Pre-opening Session and continuous trading through standard quote, order-book and trade fields.

01

Real-time quote snapshots

Query last price, previous close, OHLC, volume and change using the unified .HK symbol convention.

REST · ticker
02

Ten-level order book

REST and WebSocket depth return ten bid and ten ask levels with price and size.

REST + WS · depth
03

Time-and-sales

Query recent trades or stream executions with price, size, direction and event time.

REST + WS · trades / trade
04

Pre-opening Session monitoring

From 09:00, auction activity is available through standard ticker and depth fields; after the 09:20 random match, trades, volume and book changes align. Dedicated IEP, IEV and imbalance fields are not currently provided.

Pre-opening Session · POS 09:00–09:30

Query Hong Kong stock prices and historical bars

How should I specify a Hong Kong stock symbol?

Filter the product catalog with market=HK and type=stock, then use the returned symbol to query stock prices. The documented example is 700.HK; do not assume all leading-zero variants are interchangeable.

Why can a Hong Kong order book contain fewer than ten levels?

Hong Kong depth supports up to ten levels per side. Actual depth depends on the instrument and available quotes, and can be lower outside trading sessions or with limited liquidity. Depth requires a paid entitlement.

How do I query historical bars?

Bars support 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w and 1M: lowercase m means minutes, uppercase M means months. start_time/end_time use milliseconds; the default is 100 bars, capped at 1,000. The last bar may still be forming. Historical access depends on entitlements and availability.

Which stock price adjustments are supported?

A-shares, Hong Kong and US stocks support adjust=none (default), forward and backward. Record the query time and adjustment mode for archives or backtests; adjusted historical prices can change with corporate actions or data updates.

Code Examples

REST queries

Use documented symbols as examples; confirm current availability and account permissions in the catalog. Replace YOUR_API_KEY locally; never publish a real key in browser code.

Find symbols
curl --fail-with-body -H "X-API-Key: YOUR_API_KEY" \
  "https://api.tickdb.ai/v1/symbols/available?market=HK&type=stock&limit=100&offset=0"
Quote snapshot
curl --fail-with-body -H "X-API-Key: YOUR_API_KEY" \
  "https://api.tickdb.ai/v1/market/ticker?symbols=700.HK&type=stock"
Daily bars
curl --fail-with-body -H "X-API-Key: YOUR_API_KEY" \
  "https://api.tickdb.ai/v1/market/kline?symbol=700.HK&type=stock&interval=1d&limit=100&adjust=none"

Free is a 7-day trial for selected instruments, with quotes and permitted bar queries. It does not allow start_time/end_time historical ranges. Depth, trades and specified historical ranges require the appropriate entitlements; check the current plan for symbols and quotas.

Quick Start

# pip install websocket-client
import websocket
import json

api_key = 'your_api_key_here'
ws_url = f'wss://api.tickdb.ai/v1/realtime?api_key={api_key}'

def on_open(ws):
    ws.send(json.dumps({
        'cmd': 'subscribe',
        'data': {
            'channel': 'ticker',
            'symbols': ['700.HK', '9988.HK', '5.HK']
        }
    }))

def on_message(ws, message):
    data = json.loads(message)
    print('Received:', data)

ws = websocket.WebSocketApp(ws_url, on_open=on_open, on_message=on_message)
ws.run_forever()

Full documentation available at API Documentation

Choosing a Hong Kong stock data API

Distinguish independent data APIs, brokerage ecosystems and exchange data licensing, then decide whether you need trading or cross-market research.

Provider Live data / DepthTrading / ResearchAccess / Cost modelBest fit
TickDB Independent multi-market data API
WebSocket quotes, depth and trades; levels and fields vary by instrument and entitlement.
No order execution. Combine HK data with financials, valuation, industries, news, events and other markets.
API key, no trading account; REST / WebSocket / Skill / MCP / CLI. Free trial; plan-based access.
HK/US monitoring, market applications, research platforms and AI agents.
Futu OpenAPI Brokerage data and trading API
Subscriptions, trades and order books depend on quote rights.
HK trading requires a trading account and permissions.
Futubull + OpenD; no account opening needed for login. Quote cards and quotas depend on rights.
Data-and-trading applications for brokerage users.
HKEX Data Services Exchange data and licensing
Real-time HK exchange data products, subject to licensing.
Market and reference data; data services do not execute orders.
Evaluate licensing, connectivity and commercial fees.
Institutions, data vendors and licensing-led projects.

Use Cases

Stock Connect Arbitrage

Real-time data for Shanghai-HK and Shenzhen-HK Stock Connect securities. Calculate AH premium spreads and capture arbitrage opportunities.

China Concept Stock Cross-market Monitoring

Track price spreads between HK-listed China concept stocks and their US ADR counterparts in real time.

Hang Seng Derivatives Pricing

Real-time Hang Seng Index data powering options/futures pricing models and Greeks calculations.

Choose Your Plan

All paid plans support monthly / quarterly / semi-annual / annual billing. Prices below are annual (20% off)

Free is a 7-day trial for selected instruments, with quotes and permitted bar queries. It does not allow start_time/end_time historical ranges. Depth, trades and specified historical ranges require the appropriate entitlements; check the current plan for symbols and quotas.

🔥 Save 20% Annually

Free

Free 7-Day Trial

 

  • Selected symbols*
  • 5 concurrent subscriptions
  • Real-time quotes
  • Real-time K-line
  • 1 WebSocket connection
  • 30 req/min API calls
  • Email support
Start Free
-20%

Starter

$99/mo
$79 /mo

Billed annually $950

  • All symbols
  • 50 full-market subscriptions
  • Real-time quotes
  • Real-time K-line
  • Real-time order book
  • Real-time trades
  • 1 year historical data
  • 1 WebSocket connection
  • 60 req/min API calls
  • Basic financial data
  • Email support
Subscribe Now
-20%
Most Popular

Professional

$299/mo
$239 /mo

Billed annually $2870

  • All symbols
  • 300 full-market subscriptions
  • Real-time quotes
  • Real-time K-line
  • Real-time order book
  • Real-time trades
  • 3 years historical data
  • 3 WebSocket connections
  • 600 req/min API calls
  • Professional financial data
  • News data
  • Telegram support
Subscribe Now
-20%

All HK-Shares

$499/mo
$399 /mo

Billed annually $4790

  • All symbols
  • Full-market queries and subscriptions
  • Additional 1000 full-market subscriptions
  • Real-time quotes
  • Real-time K-line
  • Real-time order book
  • Real-time trades
  • 5 years historical data
  • 5 WebSocket connections
  • 1200 req/min API calls
  • Professional financial data
  • News data
  • Telegram support
Subscribe Now
-20%

Enterprise

$899/mo
$719 /mo

Billed annually $8630

  • All symbols
  • Full-market queries and subscriptions
  • Additional 5000 full-market subscriptions
  • Real-time quotes
  • Real-time K-line
  • Real-time order book
  • Real-time trades
  • 10 years historical data
  • 10 WebSocket connections
  • 1800 req/min API calls
  • Professional financial data
  • News data
  • Telegram support
Subscribe Now

FAQ

What are Hong Kong stock trading hours, lunch breaks and half-day sessions?

For ordinary Hong Kong shares on a full trading day, Hong Kong time (UTC+8): pre-opening is 09:00–09:30, continuous trading is 09:30–12:00 and 13:00–16:00, with a lunch break. Eligible securities then enter the closing auction, ending randomly between 16:08 and 16:10. Half-days have no afternoon session; the closing auction ends randomly at 12:08–12:10. Hong Kong does not observe daylight saving time. Holidays, special securities and exceptional arrangements follow HKEX notices.

Official trading rules

What HK stocks does TickDB cover?

3,299 symbols across HKEX Main Board and GEM, including blue chips, China concept stocks, and ETFs.

Does HK stock data include event timestamps?

Yes. WebSocket ticker, depth and trade messages include 13-digit millisecond event timestamps. End-to-end latency varies by upstream data and client network.

Does TickDB support real-time Hang Seng Index data?

Yes. Hang Seng Index, Hang Seng Tech Index, and other major indices are available via real-time WebSocket subscription.

How does TickDB compare to Futu OpenAPI?

Consider Futu for brokerage workflows and HKEX for exchange data products and licensing. TickDB suits independent market applications and Hong Kong, US and A-share research.

How should I specify a Hong Kong stock symbol?

Filter the product catalog with market=HK and type=stock, then use the returned symbol to query stock prices. The documented example is 700.HK; do not assume all leading-zero variants are interchangeable.

Why can a Hong Kong order book contain fewer than ten levels?

Hong Kong depth supports up to ten levels per side. Actual depth depends on the instrument and available quotes, and can be lower outside trading sessions or with limited liquidity. Depth requires a paid entitlement.

How do I query historical bars?

Bars support 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w and 1M: lowercase m means minutes, uppercase M means months. start_time/end_time use milliseconds; the default is 100 bars, capped at 1,000. The last bar may still be forming. Historical access depends on entitlements and availability.

Which stock price adjustments are supported?

A-shares, Hong Kong and US stocks support adjust=none (default), forward and backward. Record the query time and adjustment mode for archives or backtests; adjusted historical prices can change with corporate actions or data updates.

What data is included in the free trial?

Free is a 7-day trial for selected instruments, with quotes and permitted bar queries. It does not allow start_time/end_time historical ranges. Depth, trades and specified historical ranges require the appropriate entitlements; check the current plan for symbols and quotas.

Start Streaming Real-time Market Data

Sign up for a free API Key. WebSocket real-time streaming. Get started in minutes.