# HKEX Hong Kong Stock Exchange API
> Live data from the Hong Kong Stock Exchange (HKEX), with no key. Read the live quote for one or more HKEX-listed stocks by their stock code (price, open/high/low, previous close, change, volume, turnover, P/E and market capitalisation, in Hong Kong dollars, with the Chinese and English names); and the live value of the major Hong Kong indices (Hang Seng, Hang Seng TECH, Hang Seng China Enterprises). The Hong-Kong-equities / Hang-Seng-index layer for trading dashboards, screeners and research — distinct from other exchange readers, this is the HKEX market. Live; short cache only.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/hkex-api/..."
```

## Pricing
- **Free** (Free) — 17,000 calls/Mo, 3 req/s
- **Starter** ($20/Mo) — 340,000 calls/Mo, 8 req/s
- **Pro** ($51/Mo) — 1,760,000 calls/Mo, 20 req/s
- **Enterprise** ($118/Mo) — 8,750,000 calls/Mo, 60 req/s

## Endpoints

### Stocks

#### `GET /v1/quote` — Live quote for one or more HKEX stocks

**Parameters:**
- `codes` (query, required, string) — HKEX stock numbers, comma-separated, e.g. 00700 (Tencent), 09988 (Alibaba) Example: `00700,09988`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/hkex-api/v1/quote?codes=00700%2C09988"
```

**Response:**
```json
{
    "data": {
        "note": "The live quote for one or more HKEX-listed stocks — price, open/high/low, previous close, change, volume, turnover, turnover rate, P/E and market cap (in 100M HKD) each, with the Chinese and English names. Pass codes (the stock number, comma-separate up to 10, e.g. 00700,09988 for Tencent and Alibaba).",
        "count": 2,
        "quotes": [
            {
                "low": 462.8,
                "code": "00700",
                "high": 476.8,
                "name": "腾讯控股",
                "open": 475,
                "as_of": "2026/06/15 10:10:48",
                "price": 463.8,
                "change": 0.2,
                "volume": 6648252,
                "currency": "HKD",
                "pe_ratio": 16.97,
                "turnover": 3122964393.398,
                "english_name": "TENCENT",
                "market_cap_yi": 42243.0591,
                "turnover_rate": 3.02,
                "change_percent": 0.04,
                "previous_close": 463.6,
                "total_market_cap_yi": 42243.0591
            },
            {
                "low": 110.2,
                "code": "09988",
                "high": 113.2,
                "name": "阿里巴巴-W",
                "open": 113.1,
                "as_of": "2026/06/15 10:10:50",
                "price": 110.2,
                "change": 0,
                "volume": 21280760,
                "currency": "HKD",
                "pe_ratio": 18.03,
             
…(truncated, see openapi.json for full schema)
```

### Indices

#### `GET /v1/index` — Live value of a Hong Kong index

**Parameters:**
- `name` (query, optional, string) — HSI (Hang Seng), HSTECH (Hang Seng TECH), HSCEI (China Enterprises); default HSI Example: `HSI`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/hkex-api/v1/index?name=HSI"
```

**Response:**
```json
{
    "data": {
        "note": "The live value of a major Hong Kong stock index — current level, open, day high/low, previous close, change and percent change. Pass name (HSI = Hang Seng, HSTECH = Hang Seng TECH, HSCEI = Hang Seng China Enterprises; default HSI).",
        "index": {
            "low": 24880.59,
            "code": "HSI",
            "high": 25047.9,
            "name": "恒生指数",
            "open": 25001.42,
            "as_of": "2026/06/15 10:10:48",
            "value": 24925.02,
            "change": 206.92,
            "change_percent": 0.84,
            "previous_close": 24718.1
        },
        "source": "HKEX (Tencent)"
    },
    "meta": {
        "timestamp": "2026-06-15T02:10:51.801Z",
        "request_id": "b86e408d-ec9f-4924-9757-b8730486ead0"
    },
    "status": "ok",
    "message": "Index retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Endpoints & source

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/hkex-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "sample": {
            "hang_seng": 24925.02
        },
        "source": "Tencent public stock quote feed (qt.gtimg.cn), keyless",
        "indexes": [
            "HSI",
            "HSTECH",
            "HSCEI"
        ],
        "service": "hkex-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/index": "Live value of a Hong Kong index (name).",
            "GET /v1/quote": "Live quote for one or more HKEX stocks (codes)."
        },
        "description": "Live data from the Hong Kong Stock Exchange (HKEX) with no key: the live quote for one or more HKEX-listed stocks by code (price, open/high/low, change, volume, turnover, P/E, market cap in HKD), and the live value of the major Hong Kong indices (Hang Seng, Hang Seng TECH, Hang Seng China Enterprises). The Hong-Kong-equities / Hang-Seng-index layer for trading dashboards and screeners. Distinct from other exchange readers — the HKEX market. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-15T02:10:51.895Z",
        "request_id": "39abc6a0-662b-4e67-868b-d5d6c4c0c49a"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/hkex-api
OpenAPI spec: https://www.oanor.com/api/hkex-api/openapi.json
