# 盘口

`WS` `request · cmd 14`

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

该接口用于获取标的的盘口数据。

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

message SecurityDepthResponse {
  string symbol = 1;
  repeated Depth ask = 2;
  repeated Depth bid = 3;
}
```

## Request Parameters

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

## Response Fields

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | No | 标的代码 |
| `ask` | object[] | No | 卖盘 |
| `└ position` | int32 | No | 档位 |
| `└ price` | string | No | 价格 |
| `└ volume` | int64 | No | 挂单量 |
| `└ order_num` | int64 | No | 订单数量 |
| `bid` | object[] | No | 买盘 |
| `└ position` | int32 | No | 档位 |
| `└ price` | string | No | 价格 |
| `└ volume` | int64 | No | 挂单量 |
| `└ order_num` | int64 | No | 订单数量 |

## Response JSON Example

```json
{
  "symbol": "700.HK",
  "ask": [
    {
      "position": 1,
      "price": "335.000",
      "volume": 500,
      "order_num": 1
    }
  ],
  "bid": [
    {
      "position": 1,
      "price": "334.800",
      "volume": 69400,
      "order_num": 13
    }
  ]
}
```
