# A/H 溢價盤中數據

`GET` `/v1/quote/ahpremium/timeshares`

獲取兩地上市證券的盤中 A/H 溢價時間序列數據。

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | Yes | 兩地上市股票的港股代碼，例如 `939.HK` |
| `days` | integer | Yes | 返回的日內交易日數量，例如 `1` |

## Request Example

```bash
curl --request GET \
  --url 'https://openapi.longbridge.com/v1/quote/ahpremium/timeshares?symbol=<symbol>' \
  --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"
      }
    ]
  }
}
```
