# GET获取产品的实时买卖盘口(Depth)

## 接口说明

该接口是获取股票、加密货币、外汇、能源、商品等所有产品的实时买卖盘口

## 请求频率

跟其他接口请求频率使用同一个频率限制。具体每秒请求次数根据套餐决定。可以参考[接口限制说明](https://docs.infoway.io/getting-started/api-limitation)

## 错误码说明

参考[HTTP错误码说明](https://docs.infoway.io/getting-started/error-codes/http)

## 接口地址

### 股票接口（包括美股、港股、A股）：

* 基本路径：`/stock/batch_depth/{codes}`
* 完整路径：`https://data.infoway.io  /stock/batch_depth/{codes}`

### 日本股接口：

* 基本路径：`/japan/batch_depth/{codes}`
* 完整路径：`https://data.infoway.io  /japan/batch_depth/{codes}`

### 印度股接口：

* 基本路径：`/india/batch_depth/{codes}`
* 完整路径：`https://data.infoway.io  /india/batch_depth/{codes}`

### 加密货币接口：

* 基本路径：`/crypto/batch_depth/{codes}`
* 完整路径：`https://data.infoway.io/crypto/batch_depth/{codes}`

### 外汇、新能源、商品、贵金属、期货等产品接口：

* 基本路径：`/common/batch_depth/{codes}`
* 完整路径：`https://data.infoway.io  /common/batch_depth/{codes}`

## 请求头

| 参数       | 类型     | 必填 | 描述           |
| -------- | ------ | -- | ------------ |
| `apiKey` | String | 是  | 您套餐中的API Key |

## 入参说明

| 参数名     | 类型     | 必填 | 描述                                                                                                     | 示例值               |
| ------- | ------ | -- | ------------------------------------------------------------------------------------------------------ | ----------------- |
| `codes` | String | 是  | 查询的产品代码，多个之间用,分隔。可参考[产品列表](https://docs.infoway.io/rest-api/basic-info/get-symbol-list)，最多支持100个产品一起查询 | `TSLA.US,AAPL.US` |

## 返回示例

```json
{
    "ret": 200,
    "msg": "success",
    "traceId": "81688452-dd7c-4de7-b423-b5e39d18e298",
    "data": [
        {
            "s": "01810.HK",
            "t": 1769760489943,
            "a": [
                [
                    "35.520",
                    "35.540",
                    "35.560",
                    "35.580",
                    "35.600",
                    "35.620",
                    "35.640",
                    "35.660",
                    "35.680",
                    "35.700"
                ],
                [
                    "3031600",
                    "134600",
                    "475600",
                    "754400",
                    "1225600",
                    "946800",
                    "1173800",
                    "689000",
                    "805200",
                    "2437200"
                ]
            ],
            "b": [
                [
                    "35.500",
                    "35.480",
                    "35.460",
                    "35.440",
                    "35.420",
                    "35.400",
                    "35.380",
                    "35.360",
                    "35.340",
                    "35.320"
                ],
                [
                    "433800",
                    "858400",
                    "784400",
                    "1018200",
                    "1118600",
                    "1969200",
                    "1167200",
                    "883200",
                    "1298400",
                    "420800"
                ]
            ]
        }
    ]
}
```

| 字段名 | 类型     | 必填 | 描述                                     | 示例值                           |
| --- | ------ | -- | -------------------------------------- | ----------------------------- |
| `s` | String | 是  | 标的代码                                   | `00285.HK`                    |
| `t` | Long   | 是  | 交易时间                                   | `1747382898892`               |
| `a` | Array  | 是  | 卖盘(第一个数组表示价格 第二个数组表示成交股数，用下标对应 这里表示五档) | `[[1,2,3,4,5],[4,5,6,7,8,9]]` |
| `b` | Array  | 是  | 买盘(第一个数组表示价格 第二个数组表示成交股数，用下标对应 这里表示五档) | `[[1,2,3,4,5],[4,5,6,7,8,9]]` |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.infoway.io/rest-api/http-endpoints/get-depth.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
