> 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/china-a-shares-data-api.md).

# China A-Shares Data API

### Overview

The **Infoway China A-Share Real-Time Market Data API** provides comprehensive access to China’s equity markets, covering more than **5,000 listed securities** across the **Shanghai Stock Exchange (SSE)** and **Shenzhen Stock Exchange (SZSE)**.

It enables developers and institutional users to monitor live market movements, analyze trading activity, and make timely investment decisions with low-latency data delivery.

### 1. Retrieving the A-Share Stock List

Infoway maintains an updated list of approximately **5,000 A-share securities**.\
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 A-Share Real-Time Market Data API supports multiple categories of data feeds.

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

Provides live candlestick data for A-share securities, including open, high, low, close prices, trading volume, and turnover value.\
This allows users to visualize price movements and analyze short-term market trends.

You can access this 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": "002594.SZ",
  "respList": [
    {
      "t": "1751958000",
      "h": "326.880",
      "o": "326.880",
      "l": "326.880",
      "c": "326.880",
      "v": "1410",
      "vw": "460900.80",
      "pc": "0.00%",
      "pca": "0.000"
    }
  ]
}
```

#### 3.2 Latest Trade

Retrieve the latest trade for any listed A-share company, including price, volume, and trade direction.

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": "002594.SZ",
  "t": 1751958000999,
  "p": "326.88",
  "v": "1410",
  "vw": "460900.80",
  "td": 1
}
```

#### 3.3 Level-2 Order Book (Top-5 Depth)

Provides real-time **five-level bid/ask depth**, showing market liquidity and order book structure.

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": "002594.SZ",
  "t": 1751958003335,
  "a": [    
    [
      "326.89",
      "326.90",
      "326.91",
      "326.92",
      "326.93"
    ],
    [
      "8",
      "30",
      "10",
      "1",
      "22"
    ]
  ],
  "b": [    
    [
      "326.88",
      "326.87",
      "326.86",
      "326.85",
      "326.84"
    ],
    [
      "1452",
      "77",
      "188",
      "37",
      "21"
    ]
  ]
}

```

#### 3.4 A-Share Company 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": "002594.SZ",
  "market": "CN",
  "name_cn": "比亚迪",
  "name_en": "BYD",
  "name_hk": "比亞迪",
  "exchange": "SZSE",
  "currency": "CNY",
  "lot_size": 100,
  "total_shares": 5494665855,
  "circulating_shares": 1811265855,
  "hk_shares": 0,
  "eps": "7.326077155969296",
  "eps_ttm": "8.1607397398326417",
  "bps": "39.7406007503253353",
  "dividend_yield": "1.6401803563357903",
  "stock_derivatives": "",
  "board": "SZMainConnect"
}

```

#### 3.5 Trading Days & Market Hours

Retrieve trading session schedules and trading calendar information for the A-Share 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": "CN",
  "remark": "A 股市场",
  "trade_schedules": [
    {
      "begin_time": "09:30:00",
      "end_time": "11:30:00",
      "type": "NormalTrade"
    },
    {
      "begin_time": "13:00:00",
      "end_time": "14:57:00",
      "type": "NormalTrade"
    }
  ]
}

```

**Example: Trading Days**

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

```
