Com APIhkex.com.hk ↗
Access real-time HKEX quotes, Hang Seng indices, company announcements, historical chart data, and daily quotation reports via a simple REST API.
What is the Com API?
This API exposes 7 endpoints covering live Hong Kong Stock Exchange data, from real-time quotes for individual securities to market-wide index snapshots. The get_stock_quote endpoint returns over a dozen fields per stock including ISIN, chairman, listing date, P/E ratio, dividend yield, and a business summary. Other endpoints handle announcement retrieval, intraday and historical chart data, and the full Daily Quotations report for the Main Board.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/cd225318-0b93-40b5-9d1e-08aa24b02127/get_market_indices' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace hkex-com-hk-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
from parse_apis.hkex_market_data_api import HKEX, ChartSpan, BoardType
hkex = HKEX()
# List current market indices
for index in hkex.indexes.list():
print(index.ric, index.name, index.last_price, index.percent_change)
# List top stocks by turnover
for stock in hkex.stocks.list(limit=5):
print(stock.symbol, stock.name, stock.last_price, stock.pe_ratio)
# Search for a stock
for result in hkex.stocks.search(query="tencent"):
print(result.code, result.name, result.stock_id)
# Get detailed quote for Tencent
tencent = hkex.stocks.get(symbol="700")
chart = tencent.chart(span=ChartSpan.ONE_MONTH)
print(chart.datalist, chart.responsecode)
# Get announcements for a stock
for ann in tencent.announcements(from_date="20260601"):
print(ann.title, ann.date, ann.link)
# Fetch daily quotations report
report = hkex.stocks.daily_report(date="260609", board=BoardType.MAIN)
print(report.content)
Retrieve real-time major market indices from HKEX, including Hang Seng Index, HSCEI, Hang Seng TECH Index, and others. Returns current price, net change, percent change, and trading time for each index. Data refreshes during trading hours (09:30–16:00 HKT).
No input parameters required.
{
"type": "object",
"fields": {
"indices": "array of index objects with ric, nm_l, ls, nc, pc, date, tm",
"responsecode": "string status code from upstream API (000 = success)"
},
"sample": {
"data": {
"indices": [
{
"hc": "24,565.90",
"hi": "24,505.96",
"lo": "24,207.03",
"ls": "24,407.96",
"nc": "-157.94",
"op": "24,442.52",
"pc": "-0.64",
"tm": "16:09",
"fut": true,
"ric": ".HSI",
"date": "10 Jun 2026",
"nm_l": "Hang Seng Index",
"nm_s": "Hang Seng Index"
}
],
"responsecode": "000"
},
"status": "success"
}
}About the Com API
Market Indices and Securities
The get_market_indices endpoint returns an array of index objects covering the Hang Seng Index, HSCEI, Hang Seng TECH Index, and others. Each object includes ric, nm_l (name), ls (last price), nc (net change), pc (percent change), and a timestamp. The get_securities_list endpoint returns the top 100 equities by turnover, with fields for symbol, name, last price, net/percent change, P/E ratio, yield, market cap, and currency — useful for building turnover-ranked dashboards or screening tables.
Stock Quotes and Charts
For individual securities, get_stock_quote accepts a symbol (e.g. 700 for Tencent, 9988 for Alibaba) and returns a quote object with open, high, low, close, and previous close alongside company profile fields: ISIN, sector classification, registrar, listing date, and a business summary paragraph. get_stock_chart_data returns OHLCV arrays ([timestamp_ms, open, high, low, close, volume, turnover]) for spans ranging from 1-day intraday (1-minute intervals via interval=0) to 1 year. Both span and interval parameters are optional integers passed as strings.
Announcements and Reports
The get_company_announcements endpoint queries HKEXnews for a given stock code and optional from_date/to_date range (format YYYYMMDD). Each result includes the announcement title, date, stock name, and a direct PDF link. The get_daily_quotations endpoint returns the full-text Daily Quotations report for the Main Board for a given trading date (format YYMMDD), covering market highlights, full quotation tables, and sales records. Only the main board type is currently supported.
Search
The search_stocks endpoint accepts a keyword or partial code and returns matching equities, warrants, CBBCs, and structured products. Each result includes stockId, a zero-padded code, and name. The more field indicates whether additional results exist beyond the current page.
The Com API is a managed, monitored endpoint for hkex.com.hk — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when hkex.com.hk changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official hkex.com.hk API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a Hang Seng Index ticker using
get_market_indicesls,nc, andpcfields. - Screen the top 100 HKEX equities by turnover using
get_securities_listwith P/E and market cap filters. - Display a full stock profile card with ISIN, sector, chairman, and business summary from
get_stock_quote. - Plot intraday 1-minute OHLCV candlestick charts using
get_stock_chart_datawithspan=0andinterval=0. - Monitor company filing activity by polling
get_company_announcementswith a date range and surfacing new PDF links. - Archive the HKEX Daily Quotations report text for a given trading session using
get_daily_quotations. - Implement a securities search autocomplete using
search_stocksresults for equities, warrants, and CBBCs.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does HKEX have an official developer API?+
What does `get_stock_quote` return beyond the price?+
Does `get_daily_quotations` cover the GEM board or only the Main Board?+
board=main). GEM board quotation reports are not covered. You can fork this API on Parse and revise it to add a GEM board endpoint.Are derivatives, futures, or options data available through this API?+
search_stocks and get_securities_list, but does not include HKEX derivatives or futures contract data. You can fork it on Parse and revise to add the missing endpoint.How far back does `get_stock_chart_data` go, and what granularity is available?+
span parameter supports 1 Day, 5 Days, 1 Month, 3 Months, 6 Months, YTD, and 1 Year. The 1-Day span supports 1-minute granularity via interval=0. Longer spans return daily-resolution data points as [timestamp_ms, open, high, low, close, volume, turnover] arrays.