> ## Documentation Index
> Fetch the complete documentation index at: https://whitebit-mintlify-fix-broken-links-1774051868.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Collateral bulk limit order



## OpenAPI

````yaml /openapi/private/http-trade-v4.yaml POST /api/v4/order/collateral/bulk
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
security: []
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/bulk:
    post:
      tags:
        - Collateral Trading
      summary: Collateral bulk limit order
      description: |
        The endpoint creates multiple collateral limit orders.

        <Warning>
        Rate limit: 10000 requests/10 sec.
        </Warning>
      operationId: createCollateralBulkOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                orders:
                  type: array
                  items:
                    type: object
                    properties:
                      market:
                        type: string
                        description: >-
                          Available margin [market](/glossary#market). Example:
                          BTC_USDT
                        example: BTC_PERP
                      side:
                        type: string
                        enum:
                          - buy
                          - sell
                        description: 'Order type. Variables: ''buy'' / ''sell''.'
                        example: buy
                      amount:
                        type: string
                        description: >-
                          Amount of [stock](/glossary#stock) currency to buy or
                          sell.
                        example: '0.02'
                      price:
                        type: string
                        description: Price in [money](/glossary#money) currency.
                        example: '40000'
                      client_order_id:
                        type: string
                        description: >-
                          Identifier must be unique and contain letters,
                          numbers, dashes, dots, or underscores.
                        example: ''
                      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'
                      postOnly:
                        type: boolean
                        description: >-
                          Ensures the order adds liquidity and executes as
                          maker.
                        example: false
                      ioc:
                        type: boolean
                        description: >
                          Immediate-or-cancel (IOC) executes all or part of an
                          order immediately and cancels any unfilled portion.


                          IOC does not support `rpi=true` because RPI uses
                          post-only behavior by design.

                          The API returns error code `37` when an order item
                          sets both `ioc=true` and `rpi=true`.
                        example: false
                      rpi:
                        type: boolean
                        description: >
                          Enables Retail Price Improvement (RPI) mode.


                          RPI orders use post-only behavior by design. An RPI
                          order does not support `ioc=true`.

                          The API returns error code `37` when an order item
                          sets both `rpi=true` and `ioc=true`.
                        example: true
                      positionSide:
                        type: string
                        enum:
                          - LONG
                          - SHORT
                          - BOTH
                        description: >-
                          Defines the position direction when hedge mode is
                          enabled. See [positionSide](/glossary#position-side)
                        example: LONG
                stopOnFail:
                  type: boolean
                  default: false
                  description: >
                    Controls how the bulk order processor handles failures.


                    When true: Processing stops at the first order that fails
                    validation or execution. Only orders up to (but not
                    including) the failed order are processed.


                    When false (default): All orders in the bulk request are
                    processed regardless of individual failures. Each order
                    result is returned in the response array.
                  example: true
                request:
                  type: string
                  example: '{{request}}'
                nonce:
                  type: string
                  example: '{{nonce}}'
            example:
              orders:
                - side: buy
                  amount: '0.02'
                  price: '40000'
                  market: BTC_PERP
                  postOnly: false
                  ioc: false
                  client_order_id: ''
                  positionSide: LONG
                  rpi: true
                - side: sell
                  amount: '0.0001'
                  price: '41000'
                  market: BTC_USDT
                  postOnly: false
                  ioc: false
                  client_order_id: ''
                  positionSide: LONG
                  rpi: true
                - side: sell
                  amount: '0.02'
                  price: '0.030'
                  market: ETH_BTC
                  postOnly: false
                  ioc: false
                  client_order_id: ''
                  positionSide: LONG
                  rpi: true
              stopOnFail: true
              request: '{{request}}'
              nonce: '{{nonce}}'
      responses:
        '200':
          description: Successful response - returns array of order results
          content:
            application/json:
              schema:
                type: array
                description: >-
                  Array of order creation results. Each item contains either a
                  successful result or an error.
                items:
                  type: object
                  properties:
                    result:
                      type: object
                      nullable: true
                      description: Order data when successful, null when failed
                      properties:
                        order_id:
                          type: integer
                          description: Unique order identifier
                          example: 4326248250
                        client_order_id:
                          type: string
                          description: >-
                            Custom client 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: limit
                        timestamp:
                          type: number
                          description: Timestamp of order creation in Unix format
                          example: 1684916268.825564
                        deal_money:
                          type: string
                          description: Amount in money currency that is finished
                          example: '641.988'
                        deal_stock:
                          type: string
                          description: Amount in stock currency that is finished
                          example: '0.02'
                        amount:
                          type: string
                          description: Order amount
                          example: '0.02'
                        left:
                          type: string
                          description: Remaining amount that must be finished
                          example: '0'
                        deal_fee:
                          type: string
                          description: Fee in money that is paid when order is finished
                          example: '1.283976'
                        price:
                          type: string
                          description: Order price
                          example: '40000'
                        postOnly:
                          type: boolean
                          description: Post-only flag
                          example: false
                        ioc:
                          type: boolean
                          description: Immediate or cancel flag
                          example: false
                        status:
                          type: string
                          description: Order status
                          enum:
                            - NEW
                            - FILLED
                            - PARTIALLY_FILLED
                            - CANCELLED
                          example: FILLED
                        stp:
                          type: string
                          description: Self trade prevention mode
                          example: 'no'
                        positionSide:
                          type: string
                          description: Position side
                          enum:
                            - LONG
                            - SHORT
                            - BOTH
                          example: LONG
                        rpi:
                          type: boolean
                          description: Retail Price Improvement flag
                          example: true
                    error:
                      type: object
                      nullable: true
                      description: >-
                        Error details when order creation failed, null when
                        successful
                      properties:
                        code:
                          type: integer
                          description: Error code
                          example: 32
                        message:
                          type: string
                          description: Error message
                          example: Validation failed
                        errors:
                          type: object
                          description: Detailed validation errors
                          additionalProperties:
                            type: array
                            items:
                              type: string
                          example:
                            amount:
                              - Given amount is less than min amount 0.001.
              example:
                - result:
                    order_id: 4326248250
                    client_order_id: ''
                    market: BTC_USDT
                    side: buy
                    type: limit
                    timestamp: 1684916268.825564
                    deal_money: '641.988'
                    deal_stock: '0.02'
                    amount: '0.02'
                    left: '0'
                    deal_fee: '1.283976'
                    ioc: false
                    postOnly: false
                    price: '40000'
                    status: FILLED
                    stp: 'no'
                    positionSide: LONG
                    rpi: true
                  error: null
                - result: null
                  error:
                    code: 32
                    message: Validation failed
                    errors:
                      amount:
                        - Given amount is less than min amount 0.001.
                - result:
                    order_id: 4326248250
                    client_order_id: ''
                    market: BTC_USDT
                    side: sell
                    type: limit
                    timestamp: 1684916268.825564
                    deal_money: '641.988'
                    deal_stock: '0.02'
                    amount: '0.02'
                    left: '0'
                    deal_fee: '1.283976'
                    ioc: false
                    postOnly: false
                    price: '41000'
                    status: FILLED
                    stp: 'no'
                    positionSide: LONG
                    rpi: true
                  error: null
        '400':
          description: Inner validation failed
          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: []
components:
  schemas:
    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: |
        API Key authentication for private endpoints.

        Required headers:
        - X-TXC-APIKEY: API key
        - X-TXC-PAYLOAD: Base64 encoded JSON payload
        - X-TXC-SIGNATURE: HMAC SHA512 signature

````