{
  "path": "/futures/{settle}/contract_stats",
  "operation_id": "listContractStats",
  "auth_required": false,
  "parameters": [
    {
      "name": "settle",
      "in": "path",
      "description": "Perpetual futures settlement currency",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "btc",
          "usdt",
          "usd1"
        ]
      },
      "example": "usdt"
    },
    {
      "name": "contract",
      "in": "query",
      "description": "Futures contract",
      "required": true,
      "schema": {
        "type": "string"
      },
      "example": "BTC_USDT"
    },
    {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "Start timestamp",
      "schema": {
        "type": "integer",
        "format": "int64"
      },
      "example": 1604561000
    },
    {
      "name": "interval",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "default": "5m"
      },
      "example": "5m"
    },
    {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
        "type": "integer",
        "default": 30,
        "minimum": 1,
        "maximum": 100
      },
      "example": 30
    }
  ],
  "response_fields": {
    "200": {
      "description": "List retrieved successfully",
      "fields": [
        {
          "path": "$",
          "type": "array<object>",
          "description": "",
          "constraints": ""
        },
        {
          "path": "$[]",
          "type": "object",
          "description": "",
          "constraints": ""
        },
        {
          "path": "$[].time",
          "type": "integer",
          "description": "Stat timestamp",
          "constraints": "格式：\"int64\""
        },
        {
          "path": "$[].lsr_taker",
          "type": "number",
          "description": "Long/short taker ratio",
          "constraints": "格式：\"double\""
        },
        {
          "path": "$[].lsr_account",
          "type": "number",
          "description": "Long/short position user ratio",
          "constraints": "格式：\"double\""
        },
        {
          "path": "$[].long_liq_size",
          "type": "string",
          "description": "Long liquidation size (contracts)",
          "constraints": ""
        },
        {
          "path": "$[].long_liq_amount",
          "type": "number",
          "description": "Long liquidation amount (base currency)",
          "constraints": "格式：\"double\""
        },
        {
          "path": "$[].long_liq_usd",
          "type": "number",
          "description": "Long liquidation volume (quote currency)",
          "constraints": "格式：\"double\""
        },
        {
          "path": "$[].long_liq_usd_new",
          "type": "number",
          "description": "Long liquidations in quote currency; USDT settlement: long_liq_size × multiplier × mark price",
          "constraints": "格式：\"double\""
        },
        {
          "path": "$[].short_liq_size",
          "type": "string",
          "description": "Short liquidation size (contracts)",
          "constraints": ""
        },
        {
          "path": "$[].short_liq_amount",
          "type": "number",
          "description": "Short liquidation amount (base currency)",
          "constraints": "格式：\"double\""
        },
        {
          "path": "$[].short_liq_usd",
          "type": "number",
          "description": "Short liquidation volume (quote currency)",
          "constraints": "格式：\"double\""
        },
        {
          "path": "$[].short_liq_usd_new",
          "type": "number",
          "description": "Short liquidations in quote currency; USDT settlement: short_liq_size × multiplier × mark price",
          "constraints": "格式：\"double\""
        },
        {
          "path": "$[].open_interest",
          "type": "string",
          "description": "Total open interest size (contracts)",
          "constraints": ""
        },
        {
          "path": "$[].open_interest_usd",
          "type": "number",
          "description": "Total open interest volume (quote currency)",
          "constraints": "格式：\"double\""
        },
        {
          "path": "$[].top_lsr_account",
          "type": "number",
          "description": "Top trader long/short account ratio",
          "constraints": "格式：\"double\""
        },
        {
          "path": "$[].top_lsr_size",
          "type": "string",
          "description": "Top trader long/short position ratio",
          "constraints": ""
        },
        {
          "path": "$[].mark_price",
          "type": "number",
          "description": "Mark price",
          "constraints": "格式：\"double\""
        },
        {
          "path": "$[].top_long_size",
          "type": "string",
          "description": "Top long open interest (contracts)",
          "constraints": ""
        },
        {
          "path": "$[].top_short_size",
          "type": "string",
          "description": "Top short open interest (contracts)",
          "constraints": ""
        },
        {
          "path": "$[].long_taker_size",
          "type": "string",
          "description": "Long taker trade volume (contracts)",
          "constraints": ""
        },
        {
          "path": "$[].short_taker_size",
          "type": "string",
          "description": "Short taker trade volume (contracts)",
          "constraints": ""
        },
        {
          "path": "$[].top_long_account",
          "type": "integer",
          "description": "Number of top long accounts (large holders)",
          "constraints": "格式：\"int64\""
        },
        {
          "path": "$[].top_short_account",
          "type": "integer",
          "description": "Number of top short accounts (large holders)",
          "constraints": "格式：\"int64\""
        },
        {
          "path": "$[].long_users",
          "type": "integer",
          "description": "Number of users holding long positions",
          "constraints": "格式：\"int64\""
        },
        {
          "path": "$[].short_users",
          "type": "integer",
          "description": "Number of users holding short positions",
          "constraints": "格式：\"int64\""
        }
      ]
    }
  },
  "source_version": "v4.106.132",
  "source_url": "https://github.com/gate/gateapi-python/blob/cd2cac4d339ec0734480787d23c020f467fd7b80/openapi.yaml",
  "local_tool_limits": [
    "仅检查必填、枚举和简单数值范围",
    "复杂类型序列化、条件必填、时间窗口等以官方规则为准",
    "不会发起 API 请求"
  ]
}
