{
  "path": "/spot/order_book",
  "operation_id": "listOrderBook",
  "auth_required": false,
  "parameters": [
    {
      "name": "currency_pair",
      "in": "query",
      "description": "Currency pair",
      "required": true,
      "schema": {
        "type": "string"
      },
      "example": "BTC_USDT"
    },
    {
      "name": "interval",
      "in": "query",
      "required": false,
      "description": "Price precision for merged depth. 0 means no merging. If not specified, defaults to 0",
      "schema": {
        "type": "string",
        "default": "0"
      },
      "example": "0"
    },
    {
      "name": "limit",
      "in": "query",
      "description": "Number of depth levels",
      "required": false,
      "example": 10,
      "schema": {
        "type": "integer",
        "default": 10,
        "minimum": 1
      }
    },
    {
      "name": "with_id",
      "in": "query",
      "description": "Return order book update ID",
      "required": false,
      "example": false,
      "schema": {
        "type": "boolean",
        "default": false
      }
    }
  ],
  "response_fields": {
    "200": {
      "description": "Query successful",
      "fields": [
        {
          "path": "$",
          "type": "object",
          "description": "",
          "constraints": ""
        },
        {
          "path": "$.id",
          "type": "integer",
          "description": "Order book ID, which is updated whenever the order book is changed. Valid only when `with_id` is set to `true`",
          "constraints": "格式：\"int64\""
        },
        {
          "path": "$.current",
          "type": "integer",
          "description": "The timestamp of the response data being generated (in milliseconds)",
          "constraints": "格式：\"int64\""
        },
        {
          "path": "$.update",
          "type": "integer",
          "description": "The timestamp of when the orderbook last changed (in milliseconds)",
          "constraints": "格式：\"int64\""
        },
        {
          "path": "$.asks",
          "type": "array<array<string>>",
          "description": "Ask Depth",
          "constraints": ""
        },
        {
          "path": "$.asks[]",
          "type": "array<string>",
          "description": "Price and Quantity Pair",
          "constraints": "最少项：2；最多项：2"
        },
        {
          "path": "$.asks[][]",
          "type": "string",
          "description": "",
          "constraints": ""
        },
        {
          "path": "$.bids",
          "type": "array<array<string>>",
          "description": "Bid Depth",
          "constraints": ""
        },
        {
          "path": "$.bids[]",
          "type": "array<string>",
          "description": "Price and Quantity Pair",
          "constraints": "最少项：2；最多项：2"
        },
        {
          "path": "$.bids[][]",
          "type": "string",
          "description": "",
          "constraints": ""
        }
      ]
    }
  },
  "source_version": "v4.106.132",
  "source_url": "https://github.com/gate/gateapi-python/blob/cd2cac4d339ec0734480787d23c020f467fd7b80/openapi.yaml",
  "local_tool_limits": [
    "仅检查必填、枚举和简单数值范围",
    "复杂类型序列化、条件必填、时间窗口等以官方规则为准",
    "不会发起 API 请求"
  ]
}
