---
agentTools:
  projectIndex: https://itick-hk.readme.io/llms.txt
---

# 批量實時盤口

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "REST API",
    "description": "股票 API、外匯 API、指數 API\n支援主流市場股票（美國、香港、中國、新加坡、日本等）、全球外匯、指數以及加密貨幣的即時、歷史數據。標準易用的接口風格，簡明的文檔以及豐富的各類示例，幫助開發者快速接入。提供長期免費股票 API、免費外匯 API、免費指數 API、免費加密貨幣 API 的即時報價數據以及歷史 K 線等金融數據。",
    "version": "1.0.0"
  },
  "tags": [
    {
      "name": "Forex"
    }
  ],
  "paths": {
    "/forex/depths": {
      "get": {
        "summary": "批量實時盤口",
        "deprecated": false,
        "description": "",
        "tags": [
          "Forex",
          "Forex"
        ],
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "description": "市場代碼",
            "required": true,
            "schema": {
              "type": "string",
              "default": "gb"
            }
          },
          {
            "name": "codes",
            "in": "query",
            "description": "產品代碼",
            "required": true,
            "schema": {
              "type": "string",
              "default": "EURUSD,GBPUSD"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "響應碼,0:成功"
                    },
                    "msg": {
                      "type": "string",
                      "description": "異常信息,不為0時存在"
                    },
                    "data": {
                      "description": "響應數據",
                      "$ref": "#/components/schemas/Depth"
                    }
                  },
                  "required": [
                    "code",
                    "msg",
                    "data"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "成功示例",
                    "description": "",
                    "value": {
                      "code": 0,
                      "msg": null,
                      "data": {
                        "s": "BA_BTC_USDT",
                        "a": [
                          {
                            "po": 1,
                            "p": 67800,
                            "v": 0.36339,
                            "o": 0.36339
                          },
                          {
                            "po": 2,
                            "p": 67800.04,
                            "v": 0.00037,
                            "o": 0.00037
                          },
                          {
                            "po": 3,
                            "p": 67800.28,
                            "v": 0.00018,
                            "o": 0.00018
                          },
                          {
                            "po": 4,
                            "p": 67800.51,
                            "v": 0.00019,
                            "o": 0.00019
                          },
                          {
                            "po": 5,
                            "p": 67800.52,
                            "v": 0.0001,
                            "o": 0.0001
                          }
                        ],
                        "b": [
                          {
                            "po": 1,
                            "p": 67799.99,
                            "v": 2.49817,
                            "o": 2.49817
                          },
                          {
                            "po": 2,
                            "p": 67799.98,
                            "v": 0.06575,
                            "o": 0.06575
                          },
                          {
                            "po": 3,
                            "p": 67799.96,
                            "v": 0.09079,
                            "o": 0.09079
                          },
                          {
                            "po": 4,
                            "p": 67799.95,
                            "v": 0.1001,
                            "o": 0.1001
                          },
                          {
                            "po": 5,
                            "p": 67799.05,
                            "v": 0.0001,
                            "o": 0.0001
                          }
                        ]
                      }
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "schemas": {
      "Depth": {
        "type": "object",
        "properties": {
          "s": {
            "type": "string",
            "description": "標的代碼"
          },
          "a": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "po": {
                  "type": "integer",
                  "description": "檔位"
                },
                "p": {
                  "type": "number",
                  "description": "價格"
                },
                "v": {
                  "type": "number",
                  "description": "掛單量"
                },
                "o": {
                  "type": "number",
                  "description": "訂單數量"
                }
              },
              "required": [
                "po",
                "p",
                "v",
                "o"
              ]
            },
            "description": "賣盤"
          },
          "b": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "po": {
                  "type": "integer",
                  "description": "檔位"
                },
                "p": {
                  "type": "number",
                  "description": "價格"
                },
                "v": {
                  "type": "number",
                  "description": "掛單量"
                },
                "o": {
                  "type": "number",
                  "description": "訂單數量"
                }
              },
              "required": [
                "po",
                "p",
                "v",
                "o"
              ]
            },
            "description": "買盤"
          }
        },
        "required": [
          "s",
          "a",
          "b"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.itick.org",
      "description": "正式环境"
    }
  ],
  "security": [],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 103,
      "1": 37,
      "2": 6,
      "3": 96,
      "4": 218,
      "5": 22,
      "6": 194,
      "7": 0,
      "8": 68,
      "9": 36,
      "10": 53,
      "11": 70
    }
  }
}
```