# China A-Shares Stock API
> Live data for the Chinese A-share market (the Shanghai and Shenzhen stock exchanges), with no key. Read the live quote for one or more A-share stocks by code (price, open/high/low, previous close, change, volume, turnover, P/E, P/B and market capitalisation, in yuan); and the live value of the major Chinese indices (Shanghai Composite, Shenzhen Component, ChiNext, STAR 50). The China-equities / A-share / index layer for trading dashboards, screeners and research — distinct from other exchange readers, this is the Shanghai/Shenzhen 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/china-stock-api/..."
```

## Pricing
- **Free** (Free) — 16,500 calls/Mo, 3 req/s
- **Starter** ($18/Mo) — 330,000 calls/Mo, 8 req/s
- **Pro** ($47/Mo) — 1,720,000 calls/Mo, 20 req/s
- **Enterprise** ($111/Mo) — 8,650,000 calls/Mo, 60 req/s

## Endpoints

### Stocks

#### `GET /v1/quote` — Live quote for one or more A-share stocks

**Parameters:**
- `codes` (query, required, string) — A-share codes, comma-separated, e.g. 600519 (Kweichow Moutai), 000001 (Ping An Bank) Example: `600519,000001`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/china-stock-api/v1/quote?codes=600519%2C000001"
```

**Response:**
```json
{
    "data": {
        "note": "The live quote for one or more China A-share stocks — price, open/high/low, previous close, change, volume (in lots), turnover, turnover rate, P/E, P/B and market cap (in 100M yuan) each. Pass codes (six digits or sh/sz prefix, comma-separate up to 10, e.g. 600519,000001).",
        "count": 2,
        "quotes": [
            {
                "low": 1272.2,
                "code": "600519",
                "high": 1292.7,
                "name": "贵州茅台",
                "open": 1292.7,
                "as_of": "20260615101050",
                "price": 1276,
                "change": -15.91,
                "market": "sh",
                "pb_ratio": 5.95,
                "pe_ratio": 19.28,
                "volume_lots": 17468,
                "turnover_wan": 223619,
                "market_cap_yi": 15951.04,
                "turnover_rate": 0.14,
                "change_percent": -1.23,
                "previous_close": 1291.91,
                "total_market_cap_yi": 15951.04
            },
            {
                "low": 11.11,
                "code": "000001",
                "high": 11.21,
                "name": "平安银行",
                "open": 11.21,
                "as_of": "20260615101051",
                "price": 11.17,
                "change": -0.07,
                "market": "sz",
                "pb_ratio": 0.47,
                "pe_ratio": 5.03,
                "volume_lots": 532560,
                "turnov
…(truncated, see openapi.json for full schema)
```

### Indices

#### `GET /v1/index` — Live value of a major Chinese index

**Parameters:**
- `name` (query, optional, string) — SH (Shanghai Composite), SZ (Shenzhen Component), CYB (ChiNext), STAR (STAR 50); default SH Example: `SH`

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

**Response:**
```json
{
    "data": {
        "note": "The live value of a major Chinese stock index — current level, open, day high/low, previous close, change and percent change. Pass name (SH = Shanghai Composite, SZ = Shenzhen Component, CYB = ChiNext, STAR = STAR 50; default SH).",
        "index": {
            "low": 4051.07,
            "code": "000001",
            "high": 4092.23,
            "name": "上证指数",
            "open": 4053.58,
            "as_of": "20260615101051",
            "value": 4086.71,
            "change": 55.2,
            "change_percent": 1.37,
            "previous_close": 4031.51
        },
        "source": "China A-Shares (Tencent)"
    },
    "meta": {
        "timestamp": "2026-06-15T02:10:53.415Z",
        "request_id": "f8c53b5b-9808-4069-8eec-4b652d34d05f"
    },
    "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/china-stock-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "sample": {
            "shanghai_composite": 4086.71
        },
        "source": "Tencent public stock quote feed (qt.gtimg.cn), keyless",
        "indexes": [
            "SH",
            "SZ",
            "CYB",
            "STAR"
        ],
        "service": "china-stock-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/index": "Live value of a major Chinese index (name).",
            "GET /v1/quote": "Live quote for one or more A-share stocks (codes)."
        },
        "description": "Live data for the Chinese A-share market (Shanghai & Shenzhen stock exchanges) with no key: the live quote for one or more A-share stocks by code (price, open/high/low, change, volume, turnover, P/E, P/B, market cap in yuan), and the live value of the major Chinese indices (Shanghai Composite, Shenzhen Component, ChiNext, STAR 50). The China-equities / A-share / index layer for trading dashboards and screeners. Distinct from other exchange readers — the Shanghai/Shenzhen market. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-15T02:10:53.495Z",
        "request_id": "98c2ec12-7b32-46f3-a59c-1e3753f6ac09"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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