China A-shares
600519.SH · 000001.SZ · 920186.BJ
Shanghai, Shenzhen and Beijing stocks, with up to five order-book levels per side. Use trading sessions and calendars to distinguish auctions from continuous trading.
China A-share market data APIChoose the data your application needs: current quotes for market dashboards, historical bars for research and backtesting, and order books and trades for market monitoring. TickDB provides REST queries and WebSocket streams. Available symbols, historical depth and usage rights depend on the plan and data availability.
Data updated:
The stock API covers US, Hong Kong and China A-share markets. The combined market categories contain over 25,000 symbols, including instruments such as ETFs and bonds; this is not a common-stock count or a free-access list.
600519.SH · 000001.SZ · 920186.BJ
Shanghai, Shenzhen and Beijing stocks, with up to five order-book levels per side. Use trading sessions and calendars to distinguish auctions from continuous trading.
China A-share market data APIAAPL.US · TSLA.US · MSFT.US
NYSE, Nasdaq and other US venues, with best bid and ask quotes. Pre-market, post-market and overnight coverage depends on the symbol and entitlement.
US stock market data API700.HK · 9988.HK · 3690.HK
Hong Kong stock data with up to ten order-book levels per side. Follow pre-opening and intraday activity through quotes, depth and individual trades.
Hong Kong stock market data APIOn small screens, scroll horizontally to view the full table.
| Your task | Data to use | Access method | What to check |
|---|---|---|---|
| Display prices or maintain a watchlist | Quote snapshots and updates | REST queries or WebSocket streams | Symbol coverage, quote timestamps and entitlements |
| Research historical prices or backtest | Historical bars and price adjustments | REST queries | Historical depth, bar interval, adjustment settings and missing data |
| Monitor bid/ask prices and spreads | Order-book data | REST queries or WebSocket streams | Available depth by market and account entitlements |
| Follow executed trades | Trade data | REST queries or WebSocket streams | Query/subscription coverage and account entitlements |
These examples demonstrate the documented API, not live results. Confirm symbols and entitlements first. Keep your API key in a server-side environment variable. Python examples require requests or websockets respectively.
curl --fail-with-body -H "X-API-Key: $TICKDB_API_KEY" \
"https://api.tickdb.ai/v1/market/ticker?symbols=AAPL.US,700.HK,600519.SH&type=stock"import os
import requests
response = requests.get(
"https://api.tickdb.ai/v1/market/kline",
headers={"X-API-Key": os.environ["TICKDB_API_KEY"]},
params={
"symbol": "600519.SH", "type": "stock",
"interval": "1d", "limit": 100, "adjust": "forward",
},
timeout=15,
)
response.raise_for_status()
result = response.json()
if result["code"] != 0:
raise RuntimeError(result.get("message", "API error"))
print(result["data"])import asyncio
import json
import os
from urllib.parse import urlencode
import websockets
async def main():
query = urlencode({"api_key": os.environ["TICKDB_API_KEY"]})
async with websockets.connect(
"wss://api.tickdb.ai/v1/realtime?" + query
) as ws:
await ws.send(json.dumps({
"cmd": "subscribe",
"data": {
"channel": "ticker", "type": "stock",
"symbols": ["AAPL.US", "700.HK", "600519.SH"],
},
}))
async for message in ws:
print(json.loads(message))
asyncio.run(main())Trial access and paid entitlements differ. Confirm your symbols, historical depth, subscription limits, and access to order-book and trade data. External display and redistribution require confirmation of the applicable contract and permissions.
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.
Review plans and data accessBuild a research universe from the symbol catalog, snapshots and historical bars. Calculate momentum and volatility, with screening coverage set by market entitlements.
Evaluate strategies with historical prices and adjustment data. Track gaps, trading days and query times; the current catalog is not a historical constituent universe.
Supply data for market displays, price references and cross-market monitoring. This is a data service, not order matching or execution. Confirm external display and redistribution rights under the applicable agreement.
Display stock prices with quote snapshots and maintain cross-market watchlists with quote updates. Show quote timestamps and choose data according to symbol coverage and account entitlements.
The stock API covers US, Hong Kong and China A-share markets. The combined market categories contain over 25,000 symbols, including instruments such as ETFs and bonds; this is not a common-stock count or a free-access list.
Use Python requests with the X-API-Key header and call /v1/market/ticker for symbols such as AAPL.US, 700.HK and 600519.SH. Subscribe to WebSocket ticker for ongoing updates. Access to example symbols depends on account permissions.
Use REST for on-demand snapshots and historical bars, and WebSocket for ongoing quote, depth and trade updates. Channels, subscription limits and coverage depend on your plan; full-market streams require the corresponding market entitlement.
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.
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.
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.
Supply data for market displays, price references and cross-market monitoring. This is a data service, not order matching or execution. Confirm external display and redistribution rights under the applicable agreement.
Sign up for a free API Key. WebSocket real-time streaming. Get started in minutes.