# Depth

`WS` `request · cmd 14`

> **Quote Permission Required · Free**
> US stocks: US LV1 1-level bid/ask included free by default (pre-market, regular, after-hours, and overnight sessions).
> HK stocks: LV1 1-level bid/ask included by default; 10-level order book requires "LV2 Advanced Quotes - Plus (OpenAPI)".
> US options: no permission by default — purchase "OPRA US Options Quotes (OpenAPI)".
> _OpenAPI quote perms are separate from App/Web perms_

This API is used to obtain the depth data of security.

```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 | Security code, in ticker.region format, e.g. 700.HK |

## Response Fields

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | No | Security code |
| `ask` | object[] | No | Ask depth |
| `└ position` | int32 | No | Position |
| `└ price` | string | No | Price |
| `└ volume` | int64 | No | Volume |
| `└ order_num` | int64 | No | Number of orders |
| `bid` | object[] | No | Bid depth |
| `└ position` | int32 | No | Position |
| `└ price` | string | No | Price |
| `└ volume` | int64 | No | Volume |
| `└ order_num` | int64 | No | Number of orders |

## 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
    }
  ]
}
```
