> ## 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.

# Collateral trigger market order

> The endpoint creates a collateral trigger [market order](/glossary#market-order) using [collateral balance](/glossary#balance-collateral). The order remains inactive until the market price reaches `activation_price`, then executes immediately at the best available market price. Optionally attach `stopLoss` and `takeProfit` prices to create an [OTO](/glossary#one-triggers-the-other-oto) order that activates after the trigger market order fills.

**Price and amount steps:** from September 18, 2026, `activation_price` and an attached `stopLoss` or `takeProfit` price must be multiples of the market `tickSize`, and `amount` a multiple of `stepSize`. See [Price and amount steps](/concepts/markets#price-and-amount-steps).

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


POST

Copy URL

Copy URL

> [!NOTE]
>
> Available order types and execution flags depend on your region. A request
> for an order type or flag not available in your region is rejected with HTTP
> status `453`. See all details in
> [Order types — Regional restrictions](https://docs.whitebit.com/concepts/order-types.md#regional-restrictions)
> .

## Related resources

* [Collateral stop-limit order](https://docs.whitebit.com/api-reference/trading/collateral-stop-limit-order.md) — Place a collateral stop-limit order
* [Collateral market order](https://docs.whitebit.com/api-reference/trading/collateral-market-order.md) — Place a collateral market order for immediate execution
* [Cancel conditional order](https://docs.whitebit.com/api-reference/trading/cancel-conditional-order.md) — Cancel an active conditional order
* [Query unexecuted conditional orders](https://docs.whitebit.com/api-reference/trading/query-unexecuted-conditional-orders.md) — List active conditional orders


## OpenAPI

````yaml openapi/private/http-trade-v4.yaml POST /api/v4/order/collateral/trigger-market
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/order/collateral/trigger-market:
    post:
      tags:
        - Collateral Trading
      summary: Collateral Trigger Market Order
      description: >
        The endpoint creates a collateral trigger [market
        order](/glossary#market-order) using [collateral
        balance](/glossary#balance-collateral). The order remains inactive until
        the market price reaches `activation_price`, then executes immediately
        at the best available market price. Optionally attach `stopLoss` and
        `takeProfit` prices to create an
        [OTO](/glossary#one-triggers-the-other-oto) order that activates after
        the trigger market order fills.


        **Price and amount steps:** from September 18, 2026, `activation_price`
        and an attached `stopLoss` or `takeProfit` price must be multiples of
        the market `tickSize`, and `amount` a multiple of `stepSize`. See [Price
        and amount steps](/concepts/markets#price-and-amount-steps).


        <Warning>

        Rate limit: 10000 requests/10 sec.

        </Warning>
      operationId: createCollateralTriggerMarketOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - market
                - side
                - amount
                - activation_price
                - request
                - nonce
              properties:
                market:
                  type: string
                  description: >-
                    Available margin [market](/glossary#market). Example:
                    BTC_USDT
                  example: BTC_USDT
                side:
                  type: string
                  enum:
                    - buy
                    - sell
                  description: >-
                    Order direction. Use `buy` to open or increase a long
                    position and `sell` to open or increase a short position.
                  example: buy
                amount:
                  type: string
                  description: >-
                    Amount of [stock](/glossary#stock) currency to buy or sell.
                    Minimum and step values are market-dependent — query the
                    [market info](/api-reference/market-data/market-info)
                    endpoint for constraints.
                  example: '0.01'
                activation_price:
                  type: string
                  description: >-
                    Trigger price in [money](/glossary#money) currency. The
                    trigger market order activates when the market price reaches
                    the specified value.
                  example: '40000'
                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.
                  example: order1987111
                stopLoss:
                  type: string
                  description: >
                    Stop loss price.


                    When provided, the system creates an
                    [OTO](/glossary#one-triggers-the-other-oto) order with a
                    stop loss condition.
                  example: '50000'
                takeProfit:
                  type: string
                  description: >
                    Take profit price.


                    When provided, the system creates an
                    [OTO](/glossary#one-triggers-the-other-oto) order with a
                    take profit condition.
                  example: '30000'
                positionSide:
                  type: string
                  enum:
                    - LONG
                    - SHORT
                    - BOTH
                  description: >
                    Position direction. Optional at the request layer but
                    functionally required when hedge mode is enabled. See
                    [positionSide](/glossary#position-side).


                    - **One-way mode** (default account mode): the field is
                    ignored. Orders always use `BOTH`, and the response returns
                    `positionSide: "BOTH"` whether the field is sent or omitted.

                    - **Hedge mode**: the field MUST be `LONG` or `SHORT`.
                    Sending `BOTH`, omitting the field, or sending a value that
                    does not match the account's mode causes the trade service
                    to reject the order with error code `114` (`Hedge mode
                    position side does not match`).
                  example: LONG
                reduceOnly:
                  type: boolean
                  default: false
                  description: >-
                    When `true`, the order can only reduce or close an existing
                    position — the order cannot increase the position or open a
                    new one. If the order amount exceeds the current position
                    size, the system reduces the order to match — the response
                    returns the adjusted amount. Cannot be combined with
                    `stopLoss` or `takeProfit`. The API returns error code `116`
                    if no open position exists or the order side matches the
                    position direction. See
                    [reduce-only](/glossary#reduce-only).
                  example: false
                stp:
                  type: string
                  enum:
                    - 'no'
                    - cb
                    - cn
                    - co
                  default: 'no'
                  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`.


                    Legacy 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.


                    See [Self-Trade
                    Prevention](/platform/self-trade-prevention).
                  example: 'no'
                request:
                  type: string
                  example: '{{request}}'
                nonce:
                  type: integer
                  example: 1594297865000
            example:
              market: BTC_USDT
              side: buy
              amount: '0.01'
              activation_price: '40000'
              clientOrderId: order1987111
              reduceOnly: false
              request: '{{request}}'
              nonce: 1594297865000
      responses:
        '200':
          description: Successful response - trigger market order created
          content:
            application/json:
              schema:
                type: object
                properties:
                  orderId:
                    type: integer
                    description: Unique order identifier
                    example: 4180284841
                  clientOrderId:
                    type: string
                    description: >-
                      Custom client order identifier. Empty string if not
                      specified
                    example: order1987111
                  market:
                    type: string
                    description: Market name
                    example: BTC_USDT
                  side:
                    type: string
                    description: Order side
                    enum:
                      - buy
                      - sell
                    example: sell
                  type:
                    type: string
                    description: Order type
                    example: stop market
                  timestamp:
                    type: number
                    description: >-
                      Unix timestamp in seconds (UTC) of order creation, with
                      microsecond precision.
                    example: 1595792396.165973
                  dealMoney:
                    type: string
                    description: Amount in money currency that is finished
                    example: '0'
                  dealStock:
                    type: string
                    description: Amount in stock currency that is finished
                    example: '0'
                  amount:
                    type: string
                    description: Order amount
                    example: '0.001'
                  left:
                    type: string
                    description: Remaining amount that must be finished
                    example: '0.001'
                  dealFee:
                    type: string
                    description: Fee in money that is paid when order is finished
                    example: '0'
                  activation_price:
                    type: string
                    description: Price at which the stop market order activates
                    example: '40000'
                  status:
                    $ref: '#/components/schemas/ActiveOrderStatus'
                  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.
                    example: 'no'
                  oto:
                    type: object
                    description: OTO order data when stopLoss or takeProfit is specified
                    nullable: true
                    properties:
                      otoId:
                        type: integer
                        description: OTO order identifier
                        example: 29457221
                      stopLoss:
                        type: string
                        description: Stop loss order price
                        example: '50000'
                      takeProfit:
                        type: string
                        description: Take profit order price
                        example: '30000'
                  positionSide:
                    type: string
                    description: Position side
                    enum:
                      - LONG
                      - SHORT
                      - BOTH
                    example: LONG
                  reduceOnly:
                    type: boolean
                    description: Reduce-only flag
                    example: false
              example:
                orderId: 4180284841
                clientOrderId: order1987111
                market: BTC_USDT
                side: sell
                type: stop market
                timestamp: 1595792396.165973
                dealMoney: '0'
                dealStock: '0'
                amount: '0.001'
                left: '0.001'
                dealFee: '0'
                activation_price: '40000'
                status: FILLED
                stp: 'no'
                oto:
                  otoId: 29457221
                  stopLoss: '50000'
                  takeProfit: '30000'
                positionSide: LONG
                reduceOnly: false
        '422':
          description: >
            Inner validation failed


            Error codes:

            - `30` - default validation error code. Also returned when
            `reduceOnly=true` is combined with `stopLoss` or `takeProfit`

            - `31` - market validation failed

            - `32` - amount validation failed

            - `36` - clientOrderId validation failed

            - `10` - insufficient balance to place the order

            - `111` - resulting position would exceed the market maximum

            - `112` - pending orders value would exceed the allowed maximum

            - `113` - position side cannot be changed while open positions or
            orders exist

            - `114` - hedge mode position side does not match (sent `BOTH` or
            omitted `positionSide` in hedge mode, or sent `LONG`/`SHORT` in
            one-way mode)

            - `115` - order would open a position in the opposite direction
            (one-way mode)

            - `116` - reduce-only validation failed (no position exists or order
            side matches position direction)

            - `10011` - the market is a TradFi market and TradFi trading is
            restricted for the account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service temporarily unavailable
      security:
        - ApiKeyAuth: []
          PayloadAuth: []
          SignatureAuth: []
components:
  schemas:
    ActiveOrderStatus:
      type: string
      description: >-
        Order status. `FILLED` — fully executed. `PARTIALLY_FILLED` — partially
        executed, remainder still active. `CANCELED` — canceled before full
        execution. REST uses the single-`L` spelling `CANCELED`; the double-`L`
        `CANCELLED` and the WebSocket-only `NEW` state are not returned by this
        API.
      enum:
        - FILLED
        - PARTIALLY_FILLED
        - CANCELED
      example: FILLED
    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
  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.