# Hkex — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access real-time stock quotes, track market indices, view historical charts, and search for securities listed on the Hong Kong Stock Exchange. Stay informed with live company announcements and daily quotation reports to make better trading decisions.

**Category:** Finance & Markets | **Website:** [hkex.com.hk/](https://hkex.com.hk/) | **Docs:** [parse.bot/marketplace/17e1989b-d4fa-4985-8c53-14e7ef55058e/hkex-com-hk-api](https://parse.bot/marketplace/17e1989b-d4fa-4985-8c53-14e7ef55058e/hkex-com-hk-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-hkex-com-hk-api-17e1989b/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_company_announcements

Retrieve company announcements from HKEXnews for a specific stock. Returns title, date, stock code, stock name, and PDF link for each announcement. Results are ordered most recent first. Covers all announcement categories.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `from_date` | string | No | Start date in YYYYMMDD format. |
| `symbol` | string | Yes | Stock code (e.g. '700' for Tencent). |
| `to_date` | string | No | End date in YYYYMMDD format. Omitting defaults to today's date. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hkex-com-hk-api-17e1989b/get_company_announcements \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from_date":"<string>","symbol":"<string>","to_date":"<string>"}'
```

### get_daily_quotations

Fetch the Daily Quotations report for the Main Board. Returns the full text report including market highlights, quotations, sales records, and amendment records for the specified trading day. Only available for past trading days; weekends and holidays return an upstream error.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `board` | string | No | Board type. Only 'main' is supported. |
| `date` | string | No | Trading date in YYMMDD format (e.g. '260609' for 9 June 2026). Omitting defaults to today's date. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hkex-com-hk-api-17e1989b/get_daily_quotations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"board":"<string>","date":"<string>"}'
```

### get_market_indices

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).

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hkex-com-hk-api-17e1989b/get_market_indices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_securities_list

Fetch the list of equity securities sorted by turnover in descending order. Returns top 100 securities with current price, market cap, P/E ratio, yield, and turnover data. Useful for identifying the most actively traded stocks on the Main Board.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_type` | string | No | Product category ID. Currently only '1' (Equities) is supported. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hkex-com-hk-api-17e1989b/get_securities_list \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_type":"<string>"}'
```

### get_stock_chart_data

Retrieve intraday or historical chart data for a stock. Returns arrays of [timestamp_ms, price1, price2] data points. Intraday (span 0) returns 1-minute intervals; longer spans return daily bars.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `interval` | string | No | Interval ID. '0' for 1-minute intervals in the 1-Day span. |
| `span` | string | No | Time span ID: '0' (1 Day), '1' (5 Days), '2' (1 Month), '3' (3 Months), '4' (6 Months), '5' (YTD), '6' (1 Year), '7' (2 Years), '8' (5 Years), '9' (10 Years). |
| `symbol` | string | Yes | Stock code (e.g. '700' for Tencent). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hkex-com-hk-api-17e1989b/get_stock_chart_data \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"interval":"<string>","span":"<string>","symbol":"<string>"}'
```

### get_stock_quote

Retrieve real-time quote and detailed company profile for a specific stock. Returns price data (last, high, low, open, previous close), company info (chairman, listing date, ISIN, registrar), financials (P/E, EPS, dividend yield, market cap), and a business summary. One round-trip per stock code.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `symbol` | string | Yes | Stock code (e.g. '700' for Tencent, '9988' for Alibaba, '1299' for AIA). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hkex-com-hk-api-17e1989b/get_stock_quote \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"symbol":"<string>"}'
```

### search_stocks

Search for stocks by name or code keyword. Returns matching equities, warrants, CBBCs, and structured products listed on SEHK. Each result includes a stockId (internal identifier), code (with leading zeros), and name. The 'more' field indicates if additional results exist beyond the returned set.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword (e.g. 'tencent', 'HSBC', '700'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hkex-com-hk-api-17e1989b/search_stocks \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
