{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/whitebit/main/json-schema/whitebit-stop-limit-order-request-schema.json",
  "title": "StopLimitOrderRequest",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whitebit-http-trade-v4-openapi.yml#/components/schemas/StopLimitOrderRequest",
  "type": "object",
  "required": [
    "market",
    "side",
    "amount",
    "activation_price",
    "request",
    "nonce"
  ],
  "properties": {
    "market": {
      "type": "string",
      "description": "Trading pair. Format: `BASE_QUOTE` (e.g., `BTC_USDT`). Query `GET /api/v4/public/markets` for available markets."
    },
    "side": {
      "type": "string",
      "enum": [
        "buy",
        "sell"
      ],
      "description": "Order side. Allowed values: `buy`, `sell`."
    },
    "amount": {
      "type": "string",
      "description": "Order quantity in base (stock) currency. Minimum and maximum values are market-dependent. Query `GET /api/v4/public/markets` for `minAmount`, `minTotal`, `maxTotal`. Precision: `stockPrec`."
    },
    "price": {
      "type": "string",
      "description": "Limit price per unit in quote (money) currency applied after the stop triggers. Required unless `bboRole` is set — the BBO execution method replaces the explicit price. Minimum and maximum values are market-dependent. Precision: `moneyPrec`."
    },
    "activation_price": {
      "type": "string",
      "description": "Trigger price in quote (money) currency. For buy orders, the stop triggers when the market price rises to or above the specified price. For sell orders, the stop triggers when the market price falls to or below the specified price. Precision: `moneyPrec`."
    },
    "clientOrderId": {
      "type": "string",
      "description": "Custom client order identifier. Uniqueness is enforced only among the account's open (pending) orders on the same market — once a previous order is filled or canceled, the same identifier can be reused, including on the same market. Contains only letters, numbers, dashes, dots, or underscores."
    },
    "bboRole": {
      "type": "integer",
      "enum": [
        1,
        2
      ],
      "description": "Best Bid/Offer ([BBO](/glossary#best-bid-offer-bbo)) execution method. The system selects the best market price for execution after the stop triggers. `1` = Queue method, `2` = Counterparty method. When `bboRole` is set, `price` is not required — the BBO method determines the execution price."
    },
    "stp": {
      "type": "string",
      "enum": [
        false,
        "cb",
        "cn",
        "co"
      ],
      "default": false,
      "description": "Self-trade prevention mode. Allowed values: `no` (self-trades allowed), `cb` (cancel both the new and the existing order), `cn` (cancel the new order, keep the existing), `co` (cancel the existing order, place the new one). Default: `no`.\n\nLegacy values `cancel_both`, `cancel_new`, `cancel_old` are deprecated: the API accepts the legacy values with identical behavior until a deprecation deadline is announced, then rejects the legacy values. Responses always return the abbreviated form, regardless of which variant the request used.\n\nSee [Self-Trade Prevention](/platform/self-trade-prevention).\n"
    },
    "request": {
      "type": "string"
    },
    "nonce": {
      "type": "integer"
    }
  }
}