> For the complete documentation index, see [llms.txt](https://docs.infoway.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infoway.io/en-docs/readme/hong-kong-stock-data-api.md).

# Hong Kong Stock Data API

### Overview

The **Infoway Hong Kong Stock Real-Time Market Data API** provides comprehensive coverage of over **4,000 Hong Kong-listed companies**, offering live market data to help users monitor market movements and make timely trading decisions.

### **1. Get the Hong Kong Stock List**

Infoway API supports queries for all listed Hong Kong stocks (over 4,000 tickers). You can obtain the list in two ways:

**Option 1 — Download from the Web Portal**

Log in to your Infoway account and download the latest stock excel list file from the **Downloads** section at the right side of the dashboard.

**Option 2 — Query via API**

You can also retrieve the list programmatically through the **HTTP Symbol List API**.\
Refer to the [**GET /symbol-list**](/en-docs/rest-api/get-basic-info/get-symbol-list.md) documentation for usage details.

{% hint style="info" %}
The stock list is updated periodically to include **newly listed companies** and remove **delisted securities**. To ensure your application always reflects the latest market data, it is recommended to refresh the list regularly.
{% endhint %}

### 2. Query Methods

Infoway offers **two primary data-access methods**, optimized for different use cases:

| Method                  | Ideal Use Case                    | Description                                                                                                         |
| ----------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **HTTP API**            | Scheduled or batch data queries   | Flexible pull-based access to company fundamentals, historical quotes, real-time candlesticks, and order book data. |
| **WebSocket Streaming** | Low-latency, real-time monitoring | Push-based streaming for the fastest access to live market updates.                                                 |

{% hint style="info" %}
Both HTTP and WebSocket interfaces are subject to rate limits. See the [*Rate Limit Policy*](/en-docs/getting-started/api-limitation.md) section for detailed constraints.
{% endhint %}

### 3. Market Data Schemas

The Infoway Hong Kong Stock Real-Time Market Data API supports multiple categories of data feeds.

#### 3.1 Real-Time Candlestick (OHLCV) Data

Provides live candlestick data for Hong Kong stocks, including **open**, **high**, **low**, **close**, **volume**, **turnover**, **price change percentage**, and **absolute change**.<br>

You can access data via:

* **HTTP Request:** see [*GET /candlestick*](/en-docs/rest-api/market-data/post-candlestick-real-historical.md)
* **WebSocket Subscription:** see [*WebSocket /candlestick*](/en-docs/websocket/websocket-subscribe-method/candlestick-subscription.md) topic

**Example Response**

```json
{
  "s": "00005.HK",
  "respList": [
    {
      "t": "1752825540",
      "h": "98.250",
      "o": "98.200",
      "l": "98.150",
      "c": "98.150",
      "v": "44000",
      "vw": "4320240.000",
      "pc": "-0.05%",
      "pca": "-0.050"
    }
  ]
}
```

#### 3.2 Latest Trade

Query the latest trade details for Hong Kong-listed companies to stay up-to-date with market activity.

Access methods:

* **HTTP API:** [*GET /trades*](/en-docs/rest-api/market-data/get-latest-trade.md)
* **WebSocket:** [*Subscribe to /trades*](/en-docs/websocket/websocket-subscribe-method/latest-trade-subscription.md)

**Example Response**

```json
{
  "s": "00005.HK",
  "t": 1752826113546,
  "p": "98.150",
  "v": "956000",
  "vw": "93831400.000",
  "td": 0
}
```

#### **3.3 Level-10 Order Book (Market Depth)**

The Infoway API provides **Level-10 order book data** for Hong Kong equities, enabling users to analyze market depth and liquidity.

Access methods:

* **HTTP API:** [*GET /market-depth*](/en-docs/rest-api/market-data/get-market-depth.md)
* **WebSocket:** [*Subscribe to /Depth*](/en-docs/websocket/websocket-subscribe-method/depth-subscription.md)

**Example Response**

```json
{
  "s": "00005.HK",
  "t": 1752826121043,
  "a": [    
    [
      "98.150",
      "98.200",
      "98.250",
      "98.300",
      "98.350",
      "98.400",
      "98.450",
      "98.500",
      "98.550",
      "98.600"
    ],
    [
      "13200",
      "46400",
      "58800",
      "220800",
      "221600",
      "545200",
      "162000",
      "987600",
      "230400",
      "495200"
    ]
  ],
  "b": [    
    [
      "98.100",
      "98.050",
      "98.000",
      "97.950",
      "97.900",
      "97.850",
      "97.800",
      "97.750",
      "97.700",
      "97.650"
    ],
    [
      "128800",
      "112000",
      "178000",
      "126400",
      "223600",
      "83200",
      "194800",
      "69600",
      "80400",
      "198000"
    ]
  ]
}


```

#### 3.4 Hong Kong Stock Fundamentals

Retrieve fundamental information for listed companies, including corporate names, share structure, exchange details, and key financial indicators. ([GET / symbol-fundamentals](/en-docs/rest-api/get-basic-info/get-symbol-fundamentals.md))

**Example Response**

```json
{
  "symbol": "00005.HK",
  "market": "HK",
  "name_cn": "汇丰控股",
  "name_en": "HSBC HOLDINGS",
  "name_hk": "滙豐控股",
  "exchange": "SEHK",
  "currency": "HKD",
  "lot_size": 400,
  "total_shares": 17448265603,
  "circulating_shares": 17448265603,
  "hk_shares": 17448265603,
  "eps": "10.1970581721392237",
  "eps_ttm": "8.7684842825409303",
  "bps": "85.076501878960384",
  "dividend_yield": "5.2748074391180753",
  "stock_derivatives": "Warrant",
  "board": "HKEquity"
}
```

#### 3.5 Trading Days & Market Hours

Retrieve trading session schedules and trading calendar information for the Hong Kong Stock market.\
This ensures your system is synchronized with market open/close times and holiday periods.

**Query Methods**

* [**GET /trading-hours**](/en-docs/rest-api/get-basic-info/get-market-trading-hours.md) — Returns daily trading sessions and their start/end times
* [**GET /trading-days**](/en-docs/rest-api/get-basic-info/get-market-trading-days.md) — Returns valid trading days and half-days

**Example: Trading Hours**

```json
{
  "market": "HK",
  "remark": "港股市场",
  "trade_schedules": [
    {
      "begin_time": "09:30:00",
      "end_time": "12:00:00",
      "type": "NormalTrade"
    },
    {
      "begin_time": "13:00:00",
      "end_time": "16:00:00",
      "type": "NormalTrade"
    }
  ]
}

```

**Example: Trading Days**

```json
{
  "trade_days": [
    "20250102",
    "20250103",
    "20250106",
    "20250107",
    "20250108",
    "20250109",
    "20250110",
    "20250113",
    "20250114",
    "20250115"
  ],
  "half_trade_days": []
}
```
