# A/H 溢價

`GET` `/v1/quote/ahpremium/klines`

獲取 A+H 兩地上市股票的 A/H 溢價比率，對比 A 股和 H 股價格。

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | Yes | 標的代碼，如 `600519.SH` 或 `000001.SZ`。 |
| `line_type` | string | Yes | K 線週期，如 `day`、`week`、`month`。 |
| `line_num` | integer | Yes | 返回的 K 線數量。 |

## Request Example

```bash
curl --request GET \
  --url 'https://openapi.longbridge.com/v1/quote/ahpremium/klines?symbol=<symbol>&line_type=<line_type>&line_num=<line_num>' \
  --header 'Authorization: Bearer <access_token>'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `klines` | object[] | Yes | A/H 溢價日 K 線記錄 |
| `└ timestamp` | string | No | Unix 時間戳 |
| `└ ahpremium_rate` | string | No | A/H 溢價率 |
| `└ aprice` | string | No | A 股價格（CNY） |
| `└ apreclose` | string | No | A 股昨收價（CNY） |
| `└ hprice` | string | No | H 股價格（HKD） |
| `└ hpreclose` | string | No | H 股昨收價（HKD） |
| `└ currency_rate` | string | No | CNH/HKD 匯率 |
| `└ price_spread` | string | No | 價差 |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "klines": [
      {
        "ahpremium_rate": "0.1523",
        "apreclose": "24.80",
        "aprice": "25.10",
        "currency_rate": "0.8920",
        "hpreclose": "19.20",
        "hprice": "19.50",
        "price_spread": "1.23",
        "timestamp": "1778198400"
      }
    ]
  }
}
```
