{
  "openapi": "3.1.0",
  "info": {
    "title": "GaiaEx API",
    "version": "1.0.0",
    "description": "Official 1:1 Binance-compatible USD\u24c8-M Perpetual Futures (/fapi/v1, /fapi/v2) and Spot (/sapi/v1) REST API for GaiaEx.",
    "contact": {
      "name": "GaiaEx",
      "url": "https://gaiaex.com",
      "email": "dev@gaiaex.com"
    },
    "license": {
      "name": "MIT"
    }
  },
  "servers": [
    {
      "url": "https://openapi.gaiaex.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Market Data",
      "description": "Public USD\u24c8-M Futures market data endpoints (/fapi/v1/*)."
    },
    {
      "name": "Perpetual Trading",
      "description": "Authenticated USD\u24c8-M Futures order execution and management (/fapi/v1/*)."
    },
    {
      "name": "Perpetual Account",
      "description": "Authenticated USD\u24c8-M Futures account, balance, position, and configuration endpoints (/fapi/v1/* & /fapi/v2/*)."
    },
    {
      "name": "User Data Stream",
      "description": "ListenKey lifecycle management for real-time account and order WebSocket streams (/fapi/v1/listenKey)."
    },
    {
      "name": "Spot Market Data",
      "description": "Public Spot market data endpoints (/sapi/v1/*)."
    },
    {
      "name": "Spot Trading",
      "description": "Authenticated Spot order execution and management (/sapi/v1/* & /api/v3/*)."
    },
    {
      "name": "Spot Account",
      "description": "Authenticated Spot account balances, open orders, and trade history (/sapi/v1/* & /api/v3/*)."
    }
  ],
  "paths": {
    "/fapi/v1/ping": {
      "get": {
        "operationId": "fapi-v1-ping",
        "summary": "Test Connectivity",
        "description": "Test connectivity to the Rest API.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/fapi/v1/time": {
      "get": {
        "operationId": "fapi-v1-time",
        "summary": "Check Server Time",
        "description": "Test connectivity to the Rest API and get the current server time.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/fapi/v1/exchangeInfo": {
      "get": {
        "operationId": "fapi-v1-exchange-info",
        "summary": "Exchange Information",
        "description": "Current exchange trading rules and symbol information.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/fapi/v1/depth": {
      "get": {
        "operationId": "fapi-v1-depth",
        "summary": "Order Book",
        "description": "Get order book depth for a perpetual symbol.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 500; valid limits: [5, 10, 20, 50, 100, 500, 1000].",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/fapi/v1/trades": {
      "get": {
        "operationId": "fapi-v1-trades",
        "summary": "Recent Trades List",
        "description": "Get recent market trades.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 500; max 1000.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/fapi/v1/aggTrades": {
      "get": {
        "operationId": "fapi-v1-agg-trades",
        "summary": "Compressed/Aggregate Trades List",
        "description": "Get compressed, aggregate market trades.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromId",
            "in": "query",
            "required": false,
            "description": "ID to get aggregate trades from INCLUSIVE.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "description": "Timestamp in ms to get aggregate trades from INCLUSIVE.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "required": false,
            "description": "Timestamp in ms to get aggregate trades until INCLUSIVE.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 500; max 1000.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/fapi/v1/klines": {
      "get": {
        "operationId": "fapi-v1-klines",
        "summary": "Kline/Candlestick Data",
        "description": "Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": true,
            "description": "Kline interval (e.g. 1m, 5m, 15m, 1h, 4h, 1d).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "description": "Start time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "required": false,
            "description": "End time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 500; max 1500.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/fapi/v1/continuousKlines": {
      "get": {
        "operationId": "fapi-v1-continuous-klines",
        "summary": "Continuous Contract Kline/Candlestick Data",
        "description": "Kline/candlestick bars for a specific contract type.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "required": true,
            "description": "Underlying pair (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contractType",
            "in": "query",
            "required": true,
            "description": "Contract type.",
            "schema": {
              "type": "string",
              "enum": [
                "PERPETUAL"
              ]
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": true,
            "description": "Kline interval (e.g. 1m, 5m, 15m, 1h, 4h, 1d).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "description": "Start time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "required": false,
            "description": "End time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 500; max 1500.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/fapi/v1/markPriceKlines": {
      "get": {
        "operationId": "fapi-v1-mark-price-klines",
        "summary": "Mark Price Kline/Candlestick Data",
        "description": "Kline/candlestick bars for the mark price of a symbol.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": true,
            "description": "Kline interval (e.g. 1m, 5m, 15m, 1h, 4h, 1d).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "description": "Start time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "required": false,
            "description": "End time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 500; max 1500.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/fapi/v1/indexPriceKlines": {
      "get": {
        "operationId": "fapi-v1-index-price-klines",
        "summary": "Index Price Kline/Candlestick Data",
        "description": "Kline/candlestick bars for the index price of a pair.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "required": true,
            "description": "Underlying pair (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": true,
            "description": "Kline interval (e.g. 1m, 5m, 15m, 1h, 4h, 1d).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "description": "Start time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "required": false,
            "description": "End time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 500; max 1500.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/fapi/v1/ticker/24hr": {
      "get": {
        "operationId": "fapi-v1-ticker-24hr",
        "summary": "24hr Ticker Price Change Statistics",
        "description": "24 hour rolling window price change statistics.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Trading symbol (e.g. BTCUSDT). If omitted, tickers for all symbols will be returned.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/fapi/v1/ticker/price": {
      "get": {
        "operationId": "fapi-v1-ticker-price",
        "summary": "Symbol Price Ticker",
        "description": "Latest price for a symbol or symbols.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/fapi/v1/ticker/bookTicker": {
      "get": {
        "operationId": "fapi-v1-ticker-book-ticker",
        "summary": "Symbol Order Book Ticker",
        "description": "Best price/qty on the order book for a symbol or symbols.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/fapi/v1/premiumIndex": {
      "get": {
        "operationId": "fapi-v1-premium-index",
        "summary": "Mark Price",
        "description": "Mark Price and Funding Rate.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/fapi/v1/fundingRate": {
      "get": {
        "operationId": "fapi-v1-funding-rate",
        "summary": "Get Funding Rate History",
        "description": "Get funding rate history for perpetual symbols.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "description": "Timestamp in ms to get funding rate from INCLUSIVE.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "required": false,
            "description": "Timestamp in ms to get funding rate until INCLUSIVE.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 100; max 1000.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/fapi/v1/openInterest": {
      "get": {
        "operationId": "fapi-v1-open-interest",
        "summary": "Open Interest",
        "description": "Get present open interest of a specific symbol.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/fapi/v1/leverageBracket": {
      "get": {
        "operationId": "fapi-v1-leverage-bracket",
        "summary": "Notional and Leverage Brackets",
        "description": "Get notional and leverage brackets for symbols.",
        "tags": [
          "Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": false,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": false,
            "description": "HMAC-SHA256 signature.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/fapi/v1/order": {
      "post": {
        "operationId": "fapi-v1-post-order",
        "summary": "New Order (TRADE)",
        "description": "Send in a new perpetual futures order.",
        "tags": [
          "Perpetual Trading"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "side",
            "in": "query",
            "required": true,
            "description": "Order side.",
            "schema": {
              "type": "string",
              "enum": [
                "BUY",
                "SELL"
              ]
            }
          },
          {
            "name": "positionSide",
            "in": "query",
            "required": false,
            "description": "Position side.",
            "schema": {
              "type": "string",
              "enum": [
                "BOTH",
                "LONG",
                "SHORT"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "description": "Order type.",
            "schema": {
              "type": "string",
              "enum": [
                "LIMIT",
                "MARKET",
                "STOP",
                "TAKE_PROFIT",
                "STOP_MARKET",
                "TAKE_PROFIT_MARKET",
                "TRAILING_STOP_MARKET"
              ]
            }
          },
          {
            "name": "timeInForce",
            "in": "query",
            "required": false,
            "description": "Time in force.",
            "schema": {
              "type": "string",
              "enum": [
                "GTC",
                "IOC",
                "FOK",
                "GTX"
              ]
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "required": false,
            "description": "Order quantity.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reduceOnly",
            "in": "query",
            "required": false,
            "description": "true or false. default false.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "description": "Order price.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newClientOrderId",
            "in": "query",
            "required": false,
            "description": "A unique id among open orders.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stopPrice",
            "in": "query",
            "required": false,
            "description": "Used with STOP/STOP_MARKET or TAKE_PROFIT/TAKE_PROFIT_MARKET orders.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "closePosition",
            "in": "query",
            "required": false,
            "description": "true, false; Close-All, used with STOP_MARKET or TAKE_PROFIT_MARKET.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "activationPrice",
            "in": "query",
            "required": false,
            "description": "Used with TRAILING_STOP_MARKET orders.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "callbackRate",
            "in": "query",
            "required": false,
            "description": "Used with TRAILING_STOP_MARKET orders.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workingType",
            "in": "query",
            "required": false,
            "description": "stopPrice triggered by: MARK_PRICE or CONTRACT_PRICE.",
            "schema": {
              "type": "string",
              "enum": [
                "MARK_PRICE",
                "CONTRACT_PRICE"
              ]
            }
          },
          {
            "name": "priceProtect",
            "in": "query",
            "required": false,
            "description": "TRUE or FALSE, default FALSE.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newOrderRespType",
            "in": "query",
            "required": false,
            "description": "ACK or RESULT, default ACK.",
            "schema": {
              "type": "string",
              "enum": [
                "ACK",
                "RESULT"
              ]
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "get": {
        "operationId": "fapi-v1-get-order",
        "summary": "Query Order (USER_DATA)",
        "description": "Check an order status.",
        "tags": [
          "Perpetual Trading"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "description": "System order ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "origClientOrderId",
            "in": "query",
            "required": false,
            "description": "Original client order ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "put": {
        "operationId": "fapi-v1-put-order",
        "summary": "Modify Order (TRADE)",
        "description": "Order modify function, currently only LIMIT order modification is supported.",
        "tags": [
          "Perpetual Trading"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "description": "System order ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "origClientOrderId",
            "in": "query",
            "required": false,
            "description": "Original client order ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "side",
            "in": "query",
            "required": true,
            "description": "Order side.",
            "schema": {
              "type": "string",
              "enum": [
                "BUY",
                "SELL"
              ]
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "required": true,
            "description": "Order quantity.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": true,
            "description": "Order price.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "fapi-v1-delete-order",
        "summary": "Cancel Order (TRADE)",
        "description": "Cancel an active order.",
        "tags": [
          "Perpetual Trading"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "description": "System order ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "origClientOrderId",
            "in": "query",
            "required": false,
            "description": "Original client order ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v1/batchOrders": {
      "post": {
        "operationId": "fapi-v1-post-batch-orders",
        "summary": "Place Multiple Orders (TRADE)",
        "description": "Place multiple orders (max 5 orders per batch).",
        "tags": [
          "Perpetual Trading"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "batchOrders",
            "in": "query",
            "required": true,
            "description": "JSON array of order objects (max 5 orders).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "fapi-v1-delete-batch-orders",
        "summary": "Cancel Multiple Orders (TRADE)",
        "description": "Cancel multiple orders in a batch.",
        "tags": [
          "Perpetual Trading"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderIdList",
            "in": "query",
            "required": false,
            "description": "JSON array of orderIds, e.g. [1234567,2345678].",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "origClientOrderIdList",
            "in": "query",
            "required": false,
            "description": "JSON array of origClientOrderIds.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v1/allOpenOrders": {
      "delete": {
        "operationId": "fapi-v1-delete-all-open-orders",
        "summary": "Cancel All Open Orders (TRADE)",
        "description": "Cancel all open orders on a symbol.",
        "tags": [
          "Perpetual Trading"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v1/openOrders": {
      "get": {
        "operationId": "fapi-v1-get-open-orders",
        "summary": "Current All Open Orders (USER_DATA)",
        "description": "Get all open orders on a symbol.",
        "tags": [
          "Perpetual Trading"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v1/allOrders": {
      "get": {
        "operationId": "fapi-v1-get-all-orders",
        "summary": "All Orders (USER_DATA)",
        "description": "Get all account orders; active, canceled, or filled.",
        "tags": [
          "Perpetual Trading"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "description": "Order ID filter.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "description": "Start time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "required": false,
            "description": "End time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 500; max 1000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v2/balance": {
      "get": {
        "operationId": "fapi-v2-get-balance",
        "summary": "Futures Account Balance V2 (USER_DATA)",
        "description": "Query futures account balance.",
        "tags": [
          "Perpetual Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v2/account": {
      "get": {
        "operationId": "fapi-v2-get-account",
        "summary": "Account Information V2 (USER_DATA)",
        "description": "Get current account information, balances, and positions.",
        "tags": [
          "Perpetual Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v2/positionRisk": {
      "get": {
        "operationId": "fapi-v2-get-position-risk",
        "summary": "Position Information V2 (USER_DATA)",
        "description": "Get current position information.",
        "tags": [
          "Perpetual Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v1/userTrades": {
      "get": {
        "operationId": "fapi-v1-get-user-trades",
        "summary": "Account Trade List (USER_DATA)",
        "description": "Get trades for a specific account and symbol.",
        "tags": [
          "Perpetual Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "description": "Filter by orderId.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "description": "Start time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "required": false,
            "description": "End time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "fromId",
            "in": "query",
            "required": false,
            "description": "Trade id to fetch from.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 500; max 1000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v1/income": {
      "get": {
        "operationId": "fapi-v1-get-income",
        "summary": "Get Income History (USER_DATA)",
        "description": "Get income history (realized PnL, funding fee, commission, transfer).",
        "tags": [
          "Perpetual Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "incomeType",
            "in": "query",
            "required": false,
            "description": "Income type.",
            "schema": {
              "type": "string",
              "enum": [
                "TRANSFER",
                "WELCOME_BONUS",
                "REALIZED_PNL",
                "FUNDING_FEE",
                "COMMISSION",
                "INSURANCE_CLEAR"
              ]
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "description": "Start time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "required": false,
            "description": "End time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 100; max 1000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v1/commissionRate": {
      "get": {
        "operationId": "fapi-v1-get-commission-rate",
        "summary": "User Commission Rate (USER_DATA)",
        "description": "Get user maker and taker commission rate for a symbol.",
        "tags": [
          "Perpetual Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v1/leverage": {
      "post": {
        "operationId": "fapi-v1-post-leverage",
        "summary": "Change Initial Leverage (TRADE)",
        "description": "Change user initial leverage of specific symbol market.",
        "tags": [
          "Perpetual Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leverage",
            "in": "query",
            "required": true,
            "description": "Target initial leverage: int from 1 to 125.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v1/marginType": {
      "post": {
        "operationId": "fapi-v1-post-margin-type",
        "summary": "Change Margin Type (TRADE)",
        "description": "Change symbol level margin type (ISOLATED or CROSSED).",
        "tags": [
          "Perpetual Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "marginType",
            "in": "query",
            "required": true,
            "description": "Margin type.",
            "schema": {
              "type": "string",
              "enum": [
                "ISOLATED",
                "CROSSED"
              ]
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v1/positionSide/dual": {
      "get": {
        "operationId": "fapi-v1-get-position-side-dual",
        "summary": "Get Current Position Mode (USER_DATA)",
        "description": "Get user position mode (Hedge Mode or One-way Mode) on EVERY symbol.",
        "tags": [
          "Perpetual Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "fapi-v1-post-position-side-dual",
        "summary": "Change Position Mode (TRADE)",
        "description": "Change user position mode (Hedge Mode or One-way Mode) on EVERY symbol.",
        "tags": [
          "Perpetual Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "dualSidePosition",
            "in": "query",
            "required": true,
            "description": "true: Hedge Mode; false: One-way Mode.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v1/multiAssetsMargin": {
      "get": {
        "operationId": "fapi-v1-get-multi-assets-margin",
        "summary": "Get Current Multi-Assets Mode (USER_DATA)",
        "description": "Get user Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on Every symbol.",
        "tags": [
          "Perpetual Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "fapi-v1-post-multi-assets-margin",
        "summary": "Change Multi-Assets Mode (TRADE)",
        "description": "Change user Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on Every symbol.",
        "tags": [
          "Perpetual Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "multiAssetsMargin",
            "in": "query",
            "required": true,
            "description": "true: Multi-Assets Mode; false: Single-Asset Mode.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "The value cannot be greater than 60000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond timestamp of the request.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 signature of the query/form payload.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/fapi/v1/listenKey": {
      "post": {
        "operationId": "fapi-v1-post-listen-key",
        "summary": "Start User Data Stream (USER_STREAM)",
        "description": "Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent.",
        "tags": [
          "User Data Stream"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "put": {
        "operationId": "fapi-v1-put-listen-key",
        "summary": "Keepalive User Data Stream (USER_STREAM)",
        "description": "Keepalive a user data stream to prevent a time out.",
        "tags": [
          "User Data Stream"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "fapi-v1-delete-listen-key",
        "summary": "Close User Data Stream (USER_STREAM)",
        "description": "Close out a user data stream.",
        "tags": [
          "User Data Stream"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/sapi/v1/exchangeInfo": {
      "get": {
        "operationId": "sapi-v1-exchange-info",
        "summary": "Spot Exchange Information",
        "description": "Current spot exchange trading rules and symbol information.",
        "tags": [
          "Spot Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/sapi/v1/depth": {
      "get": {
        "operationId": "sapi-v1-depth",
        "summary": "Spot Order Book",
        "description": "Get spot order book depth for a symbol.",
        "tags": [
          "Spot Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Spot trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 100; max 5000.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/sapi/v1/trades": {
      "get": {
        "operationId": "sapi-v1-trades",
        "summary": "Spot Recent Trades List",
        "description": "Get recent spot trades.",
        "tags": [
          "Spot Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Spot trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 500; max 1000.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/sapi/v1/klines": {
      "get": {
        "operationId": "sapi-v1-klines",
        "summary": "Spot Kline/Candlestick Data",
        "description": "Kline/candlestick bars for a spot symbol.",
        "tags": [
          "Spot Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Spot trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": true,
            "description": "Kline interval (e.g. 1m, 5m, 15m, 1h, 4h, 1d).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "description": "Start time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "required": false,
            "description": "End time in milliseconds.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 500; max 1000.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/sapi/v1/ticker/24hr": {
      "get": {
        "operationId": "sapi-v1-ticker-24hr",
        "summary": "Spot 24hr Ticker Price Change Statistics",
        "description": "24 hour rolling window price change statistics for spot symbols.",
        "tags": [
          "Spot Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Spot trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/sapi/v1/ticker/price": {
      "get": {
        "operationId": "sapi-v1-ticker-price",
        "summary": "Spot Symbol Price Ticker",
        "description": "Latest price for a spot symbol or symbols.",
        "tags": [
          "Spot Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Spot trading symbol (e.g. BTCUSDT).",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/fapi/v1/technicals": {
      "get": {
        "operationId": "fapi-v1-technicals",
        "summary": "Multi-Timeframe Technical Signals",
        "description": "Pre-computed multi-timeframe technical indicator signals for a symbol.",
        "tags": [
          "Market Data"
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. BTCUSDC).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/fapi/v1/countdownCancelAll": {
      "post": {
        "operationId": "fapi-v1-countdown-cancel-all",
        "summary": "Auto-Cancel All Open Orders (TRADE)",
        "description": "Cancel all open orders on a symbol when the countdown timer expires.",
        "tags": [
          "Perpetual Trading"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Trading symbol (e.g. ETHUSDC).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "countdownTime",
            "in": "query",
            "required": true,
            "description": "Countdown time in ms (0 to cancel timer).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond epoch timestamp.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "Validity window in ms (default 5000).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 hex signature.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/fapi/v1/adlQuantile": {
      "get": {
        "operationId": "fapi-v1-adl-quantile",
        "summary": "Position ADL Quantile Estimation (USER_DATA)",
        "description": "Query position auto-deleveraging quantile estimation.",
        "tags": [
          "Perpetual Account"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Trading symbol.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond epoch timestamp.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "Validity window in ms (default 5000).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 hex signature.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array"
                }
              }
            }
          }
        }
      }
    },
    "/fapi/v1/forceOrders": {
      "get": {
        "operationId": "fapi-v1-force-orders",
        "summary": "User's Force Orders (USER_DATA)",
        "description": "Query user's force liquidation or ADL orders.",
        "tags": [
          "Perpetual Account"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Trading symbol.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond epoch timestamp.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "Validity window in ms (default 5000).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 hex signature.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array"
                }
              }
            }
          }
        }
      }
    },
    "/sapi/v1/ping": {
      "get": {
        "operationId": "sapi-v1-ping",
        "summary": "Test Spot Connectivity",
        "description": "Test connectivity to the Spot REST API.",
        "tags": [
          "Spot Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/sapi/v1/time": {
      "get": {
        "operationId": "sapi-v1-time",
        "summary": "Check Spot Server Time",
        "description": "Get current server time in milliseconds.",
        "tags": [
          "Spot Market Data"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/sapi/v1/order": {
      "post": {
        "operationId": "sapi-v1-post-order",
        "summary": "New Spot Order (TRADE)",
        "description": "Send in a new spot market or limit order.",
        "tags": [
          "Spot Trading"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Spot symbol (e.g. PURRUSDC, BTCUSDC).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "side",
            "in": "query",
            "required": true,
            "description": "BUY or SELL.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "description": "LIMIT or MARKET.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "required": true,
            "description": "Order quantity.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "description": "Limit price.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond epoch timestamp.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "Validity window in ms (default 5000).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 hex signature.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "sapi-v1-delete-order",
        "summary": "Cancel Spot Order (TRADE)",
        "description": "Cancel an active spot order.",
        "tags": [
          "Spot Trading"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Spot symbol (e.g. PURRUSDC).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "description": "Order ID to cancel.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond epoch timestamp.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "Validity window in ms (default 5000).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 hex signature.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "sapi-v1-get-order",
        "summary": "Query Spot Order (USER_DATA)",
        "description": "Check a spot order's status.",
        "tags": [
          "Spot Trading"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Spot symbol (e.g. PURRUSDC).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "description": "Order ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond epoch timestamp.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "Validity window in ms (default 5000).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 hex signature.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/sapi/v1/openOrders": {
      "get": {
        "operationId": "sapi-v1-get-open-orders",
        "summary": "Current Open Spot Orders (USER_DATA)",
        "description": "Get all open spot orders.",
        "tags": [
          "Spot Account"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Spot symbol (omit for all).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond epoch timestamp.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "Validity window in ms (default 5000).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 hex signature.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "sapi-v1-delete-open-orders",
        "summary": "Cancel All Open Spot Orders (TRADE)",
        "description": "Cancel all open spot orders on a symbol.",
        "tags": [
          "Spot Trading"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Spot symbol (e.g. PURRUSDC).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond epoch timestamp.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "Validity window in ms (default 5000).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 hex signature.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array"
                }
              }
            }
          }
        }
      }
    },
    "/sapi/v1/account": {
      "get": {
        "operationId": "sapi-v1-get-account",
        "summary": "Spot Account Information (USER_DATA)",
        "description": "Get current spot account information and token balances.",
        "tags": [
          "Spot Account"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond epoch timestamp.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "Validity window in ms (default 5000).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 hex signature.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/sapi/v1/myTrades": {
      "get": {
        "operationId": "sapi-v1-get-my-trades",
        "summary": "Spot Account Trade List (USER_DATA)",
        "description": "Get trades for a specific spot account and symbol.",
        "tags": [
          "Spot Account"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Spot symbol (e.g. PURRUSDC).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "description": "Millisecond epoch timestamp.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "required": false,
            "description": "Validity window in ms (default 5000).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "HMAC-SHA256 hex signature.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-MBX-APIKEY",
        "description": "1:1 Binance-compatible HMAC-SHA256 authentication. Pass your API key in the X-MBX-APIKEY header and sign the query string or form body with HMAC-SHA256 using your API secret, appending timestamp (ms) and signature parameters. Your wallet identity is automatically resolved server-side from your API key."
      }
    }
  }
}
