---
title: "Collateral bulk limit order"
method: POST
path: "/api/v4/order/collateral/bulk"
tags: ["Collateral Trading"]
---

# Collateral bulk limit order

`POST /api/v4/order/collateral/bulk`

The endpoint creates multiple collateral [limit orders](/glossary#limit-order) in a single request. Each order in the `orders` array is validated and processed individually. The `stopOnFail` parameter controls whether processing stops at the first failure or continues through all orders. The response array contains a result or error object for each submitted order, in the same order as the request.

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

<Accordion title="Error Codes">
  - `30` - default validation error code (per-order). Also returned when `reduceOnly=true` is combined with `stopLoss` or `takeProfit`
  - `31` - market validation failed
  - `32` - amount validation failed
  - `33` - price validation failed
  - `36` - clientOrderId validation failed
  - `37` - `ioc=true` cannot be used with `postOnly=true` or `rpi=true`
  - `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 (per-order; 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). For bulk orders, this error appears per-order inside the response array.
</Accordion>

## Request body

- object
  - `orders` object[]
    - `market` string — Available margin [market](/glossary#market). Example: BTC_USDT
    - `side` 'buy' | 'sell' — Order type. Variables: 'buy' / 'sell'.
    - `amount` string — 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.
    - `price` string — Limit order price in [money](/glossary#money) currency. Minimum price step is market-dependent.
    - `clientOrderId` string — 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.
    - `stopLoss` string — Stop loss price. When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a stop loss condition.
    - `takeProfit` string — Take profit price. When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a take profit condition.
    - `postOnly` boolean — Ensures the order adds liquidity and executes as maker. Default: `false`.
    - `ioc` boolean — Immediate-or-cancel (IOC) executes all or part of an order immediately and cancels any unfilled portion. Default: `false`. IOC does not support `rpi=true` because RPI uses post-only behavior by design. The API returns error code `40` when an order item sets both `ioc=true` and `rpi=true`.
    - `rpi` boolean — Enables Retail Price Improvement (RPI) mode. Default: `false`. RPI orders use post-only behavior by design. An RPI order does not support `ioc=true`. The API returns error code `40` when an order item sets both `rpi=true` and `ioc=true`.
    - `positionSide` 'LONG' | 'SHORT' | 'BOTH' — 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 per-order item with error code `114` (`Hedge mode position side does not match`).
    - `reduceOnly` boolean — 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).
  - `stopOnFail` boolean — 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.
  - `request` string
  - `nonce` integer

## Response `200`

Successful response - returns array of order results

- object[] — Array of order creation results. Each item contains either a successful result or an error.
  - `result` object, nullable — Order data when successful, null when failed
    - `orderId` integer — Unique order identifier
    - `clientOrderId` string — Custom client order identifier. Empty string if not specified
    - `market` string — Market name
    - `side` 'buy' | 'sell' — Order side
    - `type` string — Order type
    - `timestamp` number — Unix timestamp in seconds (UTC) of order creation, with microsecond precision.
    - `dealMoney` string — Amount in money currency that is finished
    - `dealStock` string — Amount in stock currency that is finished
    - `amount` string — Order amount
    - `left` string — Remaining amount that must be finished
    - `dealFee` string — Fee in money that is paid when order is finished
    - `price` string — Order price
    - `postOnly` boolean — Post-only flag
    - `ioc` boolean — Immediate or cancel flag
    - `status` 'NEW' | 'FILLED' | 'PARTIALLY_FILLED' | 'CANCELLED' — Order status. `NEW` — accepted, not yet matched. `FILLED` — fully executed. `PARTIALLY_FILLED` — partially executed, remainder still active. `CANCELLED` — canceled before full execution.
    - `stp` string — Self-trade prevention mode. Possible values: `no`, `cb`, `cn`, `co`. Always returned in abbreviated form, even when the request used a legacy value.
    - `positionSide` 'LONG' | 'SHORT' | 'BOTH' — Position side
    - `rpi` boolean — Retail Price Improvement flag
    - `reduceOnly` boolean — Reduce-only flag
  - `error` object, nullable — Error details when order creation failed, null when successful
    - `code` integer — Error code
    - `message` string — Error message
    - `errors` object — Detailed validation errors

## Other responses

- `400` — Inner validation failed
- `422` — Request validation failed
- `503` — Service temporarily unavailable

---

[API](https://skmtc.net/whitebit/apis/whitebit-private-http-api-v4.md) · [All operations](https://skmtc.net/whitebit/apis/whitebit-private-http-api-v4/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/whitebit/whitebit-private-http-api-v4/revisions/76c9def9942f/schema)
