A-Share Market Data API

Access Shanghai, Shenzhen and Beijing stock data with TickDB: five-level order books, trades, auction monitoring and historical bars via REST and WebSocket.

Market Coverage

Exchange / Category Symbols Data Capabilities Frequency
Shanghai Stocks 2,316
  • 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
Shenzhen Stocks 2,899
  • 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
Beijing Stocks 340
  • Quotes
  • Candlesticks
  • Intraday
  • Order book
  • Trades

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

Updates during trading sessions
ETF 1,640
  • Quotes
  • Candlesticks
  • Intraday
  • Order book
  • Trades

Also supports ETF reference data; available fields depend on the fund.

Updates during trading sessions
China Bonds 321
  • Quotes
  • Candlesticks
  • Intraday
  • Order book
  • Trades

Available quote fields and data completeness vary by bond.

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 A-share market-data capabilities

REST and WebSocket support ticker, depth, trade and 13-digit millisecond event timestamps from the opening auction through continuous trading.

01

Real-time quote snapshots

Query last price, previous close, OHLC, volume and change for quote screens, watchlists and market-wide scans.

REST · ticker
02

Five-level order book

Receive five bid and ask levels with price and size, including observable book changes during the call auction.

REST + WS · depth
03

Time-and-sales

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

REST + WS · trades / trade
04

Call-auction monitoring

From 09:15, ticker and five-level depth can be used to follow the opening auction. Matched trades then flow into quote and order-book updates.

Opening auction · from 09:15

Choose A-share live quotes, historical bars and adjustments

How do I distinguish Shanghai, Shenzhen and Beijing symbols?

Documented examples include 600000.SH, 000001.SZ and 920186.BJ. Filter with market=CN&type=stock to exclude China futures, and retain the market suffix in requests.

Which data should I use for live screens and historical research?

Use ticker and streaming updates for intraday monitoring, and bars for historical charts and indicators. A-share depth supports up to five levels per side; a full five levels are not guaranteed at every instant.

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=CN&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=600519.SH&type=stock"
Daily bars
curl --fail-with-body -H "X-API-Key: YOUR_API_KEY" \
  "https://api.tickdb.ai/v1/market/kline?symbol=600519.SH&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': ['600519.SH', '000858.SZ', '300750.SZ']
        }
    }))

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 an A-share data service

Separate live monitoring, opening-auction observation and end-of-day research before comparing depth, research data and access.

Provider Live data / AuctionsDepth / ResearchAccess / Cost modelBest fit
TickDB Multi-market data and research
WebSocket quotes, depth and trades with millisecond event timestamps. Auction-stage fields vary by instrument.
Current A-share route: five levels per side. Candles, intraday, adjustments and capital flow; financials, valuation, ownership, corporate actions, news and calendars vary by instrument and entitlement.
API key, no trading account; REST / WebSocket / Skill / MCP / CLI. Free trial; plan-based access.
Live screeners, auction observation, market terminals and cross-market AI research.
Tushare Pro Research data platform
Live/Tick access varies by endpoint. Opening-auction stk_auction_o updates after market close.
Financials, adjustments, funds and macro data.
Points and endpoint-specific permissions; query APIs / SDK.
Historical factors, fundamentals and post-market analysis.
AKShare Open-source financial data tools
Query-based public sources; timeliness and availability vary.
Includes five-level quote queries and stock, fund, futures and macro datasets.
Free and open source; maintain collection and upstream changes.
Learning, prototypes and self-maintained research tools.
Futu OpenAPI Brokerage data and trading ecosystem
A-share access depends on user region and verification.
Subscriptions and fields depend on A-share quote rights.
Futubull login + OpenD; brokerage account opening is not required to log in. Quote rights are separate.
Existing Futu users with the required quote rights.

Use Cases

Call Auction Monitoring

Track the opening price formation process during the 9:15-9:25 call auction session to support board-hitting and auction strategies.

Full-market Factor Scanning

Scan a catalog of 7,516 instruments, computing momentum, volatility, and other factors in real time for quant stock selection.

Margin Trading & Northbound Capital Linkage

Combine real-time market data with capital flow data to monitor institutional money movements.

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 A-Shares

$599/mo
$479 /mo

Billed annually $5750

  • All symbols
  • Full-market queries and subscriptions
  • Additional 1500 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 A-share trading and call-auction hours?

For Shanghai, Shenzhen and Beijing stock auction trading, Beijing time (UTC+8): opening call auction 09:15–09:25, continuous auction 09:30–11:30 and 13:00–14:57, closing call auction 14:57–15:00. Lunch is 11:30–13:00. Trading normally runs Monday–Friday except exchange holidays, without daylight saving time. After-hours fixed-price trading, block trades, funds and bonds have separate rules; this is not a universal schedule for every China-market product.

What is TickDB's A-share coverage?

7,516 instruments across Shanghai, Shenzhen and Beijing stocks, ETFs and China bonds.

Is A-share data real-time?

Yes. WebSocket provides ticker, depth and trade updates during trading sessions with 13-digit millisecond event timestamps.

How does TickDB compare to Tushare?

Evaluate Tushare for historical factors, AKShare for open-source prototypes and Futu for its brokerage ecosystem. TickDB combines live data, company research and cross-market AI access; validate auction-stage fields for your instruments.

Can overseas users access A-share data?

Yes. TickDB serves developers globally with English API documentation. Overseas users can connect to A-share real-time data directly.

How do I distinguish Shanghai, Shenzhen and Beijing symbols?

Documented examples include 600000.SH, 000001.SZ and 920186.BJ. Filter with market=CN&type=stock to exclude China futures, and retain the market suffix in requests.

Which data should I use for live screens and historical research?

Use ticker and streaming updates for intraday monitoring, and bars for historical charts and indicators. A-share depth supports up to five levels per side; a full five levels are not guaranteed at every instant.

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.