# 分时

`WS` `request · cmd 18`

> **行情权限要求 · 免费**
> 美股：默认免费赠送 US LV1 实时行情（含盘前、盘中、盘后、夜盘全时段）。
> 港股：默认赠送 LV1 实时行情。
> 美股期权：默认无权限，需购买「OPRA 美股期权行情 (OpenAPI)」行情卡。
> _OpenAPI 行情权限独立于 App/Web 行情权限_

该接口用于获取标的的当日分时数据。

```protobuf
message SecurityIntradayRequest {
  string symbol = 1;
}

message SecurityIntradayResponse {
  string symbol = 1;
  repeated Line lines = 2;
}
```

## Request Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | Yes | 标的代码，使用 ticker.region 格式，例如：700.HK |

## Response Fields

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | No | 标的代码，例如：AAPL.US |
| `lines` | object[] | No | 分时数据 |
| `└ price` | string | No | 当前分钟的收盘价格 |
| `└ timestamp` | int64 | No | 当前分钟的开始时间 |
| `└ volume` | int64 | No | 成交量 |
| `└ turnover` | string | No | 成交额 |
| `└ avg_price` | string | No | 均价 |

## Response JSON Example

```json
{
  "symbol": "700.HK",
  "lines": [
    {
      "price": "330.400",
      "timestamp": 1651023000,
      "volume": 375870,
      "turnover": "123949699.000",
      "avg_price": "329.767470"
    }
  ]
}
```
