> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whitebit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Query unexecuted (active) conditional orders

> The endpoint returns active (unexecuted) conditional orders for the authenticated account. Conditional orders include [OCO](/glossary#oco-orders) and [OTO](/glossary#one-triggers-the-other-oto) types. The response uses polymorphic structure — each record contains a `type` field (`oco` or `oto`) that determines the record shape. Use the optional `market` parameter to filter results.

<Warning>
Rate limit: 12000 requests/10 sec.
</Warning>


POST

<select value={baseUrl} onChange={(function (e) {
setBaseUrl(e.target.value);
})} onClick={(function (e) {
e.stopPropagation();
})}><option value="https://whitebit.com">[https://whitebit.com](https://whitebit.com)</option>
<option value="https://whitebit.eu">[https://whitebit.eu](https://whitebit.eu)</option></select>

Copy URL

Copy URL

## Related resources

* [Query unexecuted OCO orders](/api-reference/trading/query-unexecuted-oco-orders) — List active OCO orders
* [Cancel conditional order](/api-reference/trading/cancel-conditional-order) — Cancel an active conditional order
* [Collateral stop-limit order](/api-reference/trading/collateral-stop-limit-order) — Place a collateral stop-limit order
* [Create collateral OCO order](/api-reference/trading/create-collateral-oco-order) — Create a combined limit and stop-limit order


## OpenAPI

````yaml openapi/private/http-trade-v4.yaml POST /api/v4/conditional-orders
openapi: 3.0.3
info:
  title: Private HTTP API V4 - Collateral Trading
  description: |
    WhiteBIT Private HTTP API V4 for collateral/margin trading operations.

    Base URL: https://whitebit.com

    All endpoints return time in Unix-time format.
    All endpoints return either a JSON object or array.
    For receiving responses from API calls please use http method POST.

    Authentication required for all endpoints.
  version: 4.0.0
  license:
    name: WhiteBIT Terms of Service
    url: https://whitebit.com/terms
servers:
  - url: https://whitebit.com
    description: WhiteBIT Global Server
  - url: https://whitebit.eu
    description: WhiteBIT EU Server
  - url: https://whitebit.tr
    description: WhiteBIT TR Server
  - url: https://whitebit.ge
    description: WhiteBIT GE Server
security:
  - ApiKeyAuth: []
    PayloadAuth: []
    SignatureAuth: []
tags:
  - name: Collateral Trading
    description: Endpoints for collateral/margin trading operations
  - name: Spot Trading
    description: Endpoints for spot trading operations
  - name: Market Fee
    description: Endpoints for querying trading fees
paths:
  /api/v4/conditional-orders:
    post:
      tags:
        - Collateral Trading
      summary: Query unexecuted(active) conditional orders
      description: >
        The endpoint returns active (unexecuted) conditional orders for the
        authenticated account. Conditional orders include
        [OCO](/glossary#oco-orders) and
        [OTO](/glossary#one-triggers-the-other-oto) types. The response uses
        polymorphic structure — each record contains a `type` field (`oco` or
        `oto`) that determines the record shape. Use the optional `market`
        parameter to filter results.


        <Warning>

        Rate limit: 12000 requests/10 sec.

        </Warning>
      operationId: getConditionalOrders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                market:
                  type: string
                  description: >
                    Filter by specific market. Example: BTC_USDT


                    If not specified, returns conditional orders for all
                    markets.
                  example: BTC_USDT
                offset:
                  type: integer
                  description: Number of records to skip for pagination.
                  default: 0
                  minimum: 0
                  maximum: 4294967295
                  example: 0
                limit:
                  type: integer
                  description: Maximum number of records to return per page.
                  default: 100
                  minimum: 1
                  maximum: 100
                  example: 100
                request:
                  type: string
                  example: '{{request}}'
                nonce:
                  type: integer
                  example: 1594297865000
            example:
              market: BTC_USDT
              offset: 0
              limit: 100
      responses:
        '200':
          description: >-
            Successful response - returns paginated conditional orders (OCO and
            OTO types)
          content:
            application/json:
              schema:
                type: object
                properties:
                  limit:
                    type: integer
                    description: Number of records per page
                    example: 100
                  offset:
                    type: integer
                    description: Number of records skipped
                    example: 0
                  total:
                    type: integer
                    description: Total number of records
                    example: 2
                  records:
                    type: array
                    description: Array of conditional orders (can be OCO or OTO type)
                    items:
                      oneOf:
                        - type: object
                          description: OCO type conditional order
                          properties:
                            id:
                              type: integer
                              description: Conditional order identifier
                              example: 117703764513
                            type:
                              type: string
                              enum:
                                - oco
                              example: oco
                            conditionalOrderType:
                              type: string
                              description: Conditional order subtype. Omitted when not set.
                            stopLoss:
                              description: >-
                                Stop-loss leg of the OCO order. The `reduceOnly`
                                flag is returned per leg.
                              allOf:
                                - $ref: '#/components/schemas/ConditionalOrderLeg'
                            takeProfit:
                              description: >-
                                Take-profit leg of the OCO order. The
                                `reduceOnly` flag is returned per leg.
                              allOf:
                                - $ref: '#/components/schemas/ConditionalOrderLeg'
                        - type: object
                          description: OTO type conditional order
                          properties:
                            id:
                              type: integer
                              description: Conditional order identifier
                              example: 29457221
                            type:
                              type: string
                              enum:
                                - oto
                              example: oto
                            conditionalOrderType:
                              type: string
                              description: Conditional order subtype. Omitted when not set.
                              example: margin_take_profit
                            stopLossPrice:
                              type: string
                              description: Stop loss order price
                              example: '30000'
                            takeProfitPrice:
                              type: string
                              description: Take profit order price
                              example: '50000'
                            conditionalOrder:
                              description: >-
                                The linked active order. Same shape as an
                                `/api/v4/orders` record, including its per-order
                                `reduceOnly` flag.
                              allOf:
                                - $ref: '#/components/schemas/OrderResponse'
              example:
                limit: 100
                offset: 0
                total: 2
                records:
                  - id: 117703764513
                    type: oco
                    stopLoss:
                      orderId: 117703764514
                      clientOrderId: ''
                      market: BTC_USDT
                      side: buy
                      type: margin stop limit
                      timestamp: 1594605801.49815
                      dealMoney: '0'
                      dealStock: '0'
                      amount: '2.241379'
                      left: '2.241379'
                      dealFee: '0'
                      postOnly: false
                      status: OPEN
                      stp: 'no'
                      positionSide: LONG
                      reduceOnly: false
                      mtime: 1662478154.941582
                      price: '19928.79'
                      activationPrice: '29928.79'
                      activationCondition: gte
                      activated: 0
                    takeProfit:
                      orderId: 117703764515
                      clientOrderId: ''
                      market: BTC_USDT
                      side: buy
                      type: margin limit
                      timestamp: 1662478154.941582
                      dealMoney: '0'
                      dealStock: '0'
                      amount: '0.635709'
                      left: '0.635709'
                      dealFee: '0'
                      postOnly: false
                      status: OPEN
                      stp: 'no'
                      positionSide: LONG
                      reduceOnly: false
                      mtime: 1662478154.941582
                      price: '9928.79'
                  - id: 29457221
                    type: oto
                    stopLossPrice: '30000'
                    takeProfitPrice: '50000'
                    conditionalOrder:
                      orderId: 3686033640
                      clientOrderId: customId11
                      market: BTC_USDT
                      side: buy
                      type: limit
                      timestamp: 1594605801.49815
                      dealMoney: '0'
                      dealStock: '0'
                      amount: '2.241379'
                      left: '2.241379'
                      dealFee: '0'
                      ioc: false
                      status: OPEN
                      stp: 'no'
                      rpi: false
                      reduceOnly: false
                      price: '40000'
                      postOnly: false
                      positionSide: LONG
        '400':
          description: >
            Inner validation failed


            Error codes:

            - `30` - default validation error code (invalid pagination — `limit`
            outside 1–100 or negative `offset`)

            - `31` - market validation failed (the `market` filter is unknown or
            not available for collateral trading)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service temporarily unavailable
      security:
        - ApiKeyAuth: []
          PayloadAuth: []
          SignatureAuth: []
components:
  schemas:
    ConditionalOrderLeg:
      type: object
      description: >-
        Conditional-order leg as returned by `/api/v4/conditional-orders`. Field
        names use camelCase (`postOnly`, `activationPrice`) — unlike the
        snake_case legs returned by `/api/v4/oco-orders` and
        `/api/v4/order/oco-cancel`; do not treat the two shapes as
        interchangeable.
      properties:
        orderId:
          type: integer
          description: Order identifier
          example: 117703764514
        clientOrderId:
          type: string
          description: Custom order identifier. Empty string if not specified
          example: ''
        market:
          type: string
          description: Market name
          example: BTC_USDT
        side:
          type: string
          description: Order side
          enum:
            - buy
            - sell
          example: buy
        type:
          type: string
          description: Order type
          example: margin stop limit
        timestamp:
          type: number
          description: >-
            Unix timestamp in seconds (UTC) of order creation, with microsecond
            precision.
          example: 1594605801.49815
        dealMoney:
          type: string
          description: Executed amount in money
          example: '0'
        dealStock:
          type: string
          description: Executed amount in stock
          example: '0'
        amount:
          type: string
          description: Order amount
          example: '2.241379'
        left:
          type: string
          description: Unexecuted amount in stock
          example: '2.241379'
        dealFee:
          type: string
          description: Executed fee by deal
          example: '0'
        postOnly:
          type: boolean
          description: Post-only flag. Omitted when not set
          example: false
        status:
          type: string
          description: >-
            Order status (for example `OPEN` for an active leg, `CANCELED` after
            cancellation).
          example: OPEN
        stp:
          type: string
          description: >-
            Self-trade prevention mode. Possible values: `no`, `cb`, `cn`, `co`.
            Always returned in abbreviated form, even when the request used a
            legacy value. Omitted when not set.
          example: 'no'
        positionSide:
          type: string
          description: >-
            Position side of the leg. Present on futures markets (`BOTH` in
            one-way mode, `LONG`/`SHORT` in hedge mode); omitted on margin-spot
            markets.
          enum:
            - LONG
            - SHORT
            - BOTH
          example: LONG
        reduceOnly:
          type: boolean
          description: >-
            Reduce-only flag. When `true`, the leg can only reduce or close an
            existing position.
          example: false
        mtime:
          type: number
          description: >-
            Unix timestamp in seconds (UTC), with microsecond precision, of the
            last time the matching engine modified the order.
          example: 1662478154.941582
        price:
          type: string
          description: Order price
          example: '19928.79'
        activationPrice:
          type: string
          description: >-
            Activation price. Returned on the stop-loss leg; omitted when not
            set
          example: '29928.79'
        activationCondition:
          type: string
          description: >
            Trigger condition derived from `side` (response-only, cannot be
            overridden): `buy` → `gte`, `sell` → `lte`. Returned on the
            stop-loss leg; omitted when not set.
          enum:
            - gte
            - lte
          example: gte
        activated:
          type: integer
          description: >-
            Activation status (0 - not activated, 1 - activated). Omitted when
            not set
          example: 0
    OrderResponse:
      type: object
      description: >-
        Shared order shape returned by the order-creation, cancel, active-orders
        list, and modify endpoints. Field presence varies by endpoint and order
        type — see the per-field notes.
      properties:
        orderId:
          type: integer
          description: Unique identifier assigned to the order by the matching engine.
          example: 4180284841
        clientOrderId:
          type: string
          description: >-
            Custom client order identifier supplied in the request. Returns an
            empty string when not specified.
          example: order1987111
        market:
          type: string
          description: 'Trading pair for the order. Format: `BASE_QUOTE` (e.g., `BTC_USDT`).'
          example: BTC_USDT
        side:
          type: string
          description: 'Order side. Possible values: `buy`, `sell`.'
          example: buy
        type:
          type: string
          description: >-
            Order type. Possible values: `limit`, `market`, `stock market`,
            `stop limit`, `stop market`.
          example: limit
        timestamp:
          type: number
          description: >-
            Unix timestamp in seconds (UTC) of order creation, with microsecond
            precision.
          example: 1595792396.165973
        dealMoney:
          type: string
          description: >-
            Filled amount in quote currency. Returns `"0"` while the order
            remains unfilled.
          example: '0'
        dealStock:
          type: string
          description: >-
            Filled amount in base currency. Returns `"0"` while the order
            remains unfilled.
          example: '0'
        amount:
          type: string
          description: >-
            Order quantity in base currency for limit and stop-limit orders, or
            in quote currency for buy market orders.
          example: '0.01'
        left:
          type: string
          description: >-
            Remaining unfilled quantity. Equals `amount` for new orders and
            `"0"` for fully filled orders.
          example: '0.001'
        dealFee:
          type: string
          description: >-
            Cumulative trading fee charged for filled portions, denominated in
            the fee asset.
          example: '0'
        feeAsset:
          type: string
          description: >-
            Currency ticker of the asset used to pay the trading fee. Omitted
            when empty.
          example: USDT
        price:
          type: string
          description: >-
            Limit price per unit in quote currency. Present for orders that
            carry a price (limit and stop-limit shapes); omitted on market and
            stop-market order shapes.
          example: '40000'
        postOnly:
          type: boolean
          description: >-
            Post-only flag. When `true`, the order executes only as a maker
            order and is rejected if it would match immediately. Omitted when
            not set.
          example: false
        ioc:
          type: boolean
          description: >-
            Immediate-or-cancel flag. When `true`, the order executes available
            quantity immediately and cancels the unfilled remainder. Default:
            `false`.
          example: false
        status:
          $ref: '#/components/schemas/OrderStatus'
        stp:
          type: string
          description: >-
            Self-trade prevention mode applied to the order. Possible values:
            `no`, `cb`, `cn`, `co`. The response always returns the abbreviated
            form, even when the request used a legacy value. Default: `no`.
          example: 'no'
        positionSide:
          type: string
          description: >-
            Position side (for collateral orders). Returned on the cancel,
            active-orders list, and modify responses; omitted when not set. Spot
            order-creation responses do not include the field.
          example: LONG
        oto:
          type: object
          description: >-
            OTO order data. Present only when the order belongs to an
            [OTO](/glossary#one-triggers-the-other-oto) group — returned on the
            cancel, active-orders list, and modify responses.
          properties:
            otoId:
              type: integer
              description: OTO order identifier
              example: 29457221
            takeProfit:
              type: string
              description: Take profit order price
              example: '50000'
            stopLoss:
              type: string
              description: Stop loss order price
              example: '30000'
        rpi:
          type: boolean
          description: Indicates Retail Price Improvement (RPI) mode for the order.
          example: true
        retail:
          type: boolean
          description: >-
            Retail-source taker flag. The field is present only when the order
            was placed with `retail=true`. See [Retail
            flag](/glossary#retail-flag).
          example: true
        reduceOnly:
          type: boolean
          description: >-
            Reduce-only flag. When `true`, the order can only reduce or close an
            existing position. Returned on the cancel, active-orders list, and
            modify responses; spot order-creation responses do not include the
            field. See [reduce-only](/glossary#reduce-only).
          example: false
        activated:
          type: integer
          description: >-
            Activation status of the stop order. 0 = not yet triggered (waiting
            for the activation_price condition to be met). 1 = triggered (the
            stop condition has been met and the order is now active). Returned
            for stop orders; omitted on other order shapes.
          example: 0
        activationCondition:
          type: string
          enum:
            - lte
            - gte
          description: >
            Trigger condition for the stop order. Response-only — not accepted
            in the request body, and cannot be overridden. Derived from `side`:


            - `side = buy` → `gte`. The order activates when the market price
            rises to or above `activation_price`.

            - `side = sell` → `lte`. The order activates when the market price
            falls to or below `activation_price`.
          example: lte
        activation_price:
          type: string
          description: >-
            The trigger price for the stop order. Always equals the
            activation_price value submitted in the request. Returned for stop
            orders; omitted on other order shapes.
          example: '40000'
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: Error code
          example: 30
        message:
          type: string
          description: Error message
          example: Validation failed
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Detailed error information
    OrderStatus:
      type: string
      description: >-
        Order lifecycle status. `FILLED` — fully executed. `CANCELED` — canceled
        before execution. `PARTIALLY_FILLED` — partially executed, remainder
        still active. `CANCELED_TAKER_BAND` — partially filled up to the taker
        band limit, remainder canceled to protect against excessive order book
        slippage. `AUTO_CANCELED_REDUCE_ONLY` — pending reduce-only order
        auto-canceled because the associated position was closed.
        `AUTO_CANCELED_LIQUIDATION` — pending order auto-canceled because the
        associated position was force-liquidated. `CANCELED_STP` — order
        canceled by [Self-Trade Prevention](/platform/self-trade-prevention).
        REST returns the single-`L` spelling throughout; `NEW` and
        `PARTIAL_FILLED` are not REST values (`NEW` is WebSocket-only; the
        partially-filled state is `PARTIALLY_FILLED`).
      example: FILLED
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-TXC-APIKEY
      description: The public WhiteBIT API key.
    PayloadAuth:
      type: apiKey
      in: header
      name: X-TXC-PAYLOAD
      description: Base64-encoded JSON request body.
    SignatureAuth:
      type: apiKey
      in: header
      name: X-TXC-SIGNATURE
      description: >-
        HMAC-SHA512 signature of the payload, hex-encoded. Computed as
        hex(HMAC-SHA512(payload, api_secret)).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.