Skip to main content
POST
/
api
/
v4
/
order
/
collateral
/
bulk
Collateral bulk limit order
curl --request POST \
  --url https://whitebit.com/api/v4/order/collateral/bulk \
  --header 'Content-Type: application/json' \
  --header 'X-TXC-APIKEY: <api-key>' \
  --header 'X-TXC-PAYLOAD: <api-key>' \
  --header 'X-TXC-SIGNATURE: <api-key>' \
  --data '
{
  "orders": [
    {
      "side": "buy",
      "amount": "0.02",
      "price": "40000",
      "market": "BTC_PERP",
      "postOnly": false,
      "ioc": false,
      "client_order_id": "",
      "positionSide": "LONG",
      "rpi": true,
      "reduceOnly": false
    },
    {
      "side": "sell",
      "amount": "0.0001",
      "price": "41000",
      "market": "BTC_USDT",
      "postOnly": false,
      "ioc": false,
      "client_order_id": "",
      "positionSide": "LONG",
      "rpi": true,
      "reduceOnly": true
    },
    {
      "side": "sell",
      "amount": "0.02",
      "price": "0.030",
      "market": "ETH_BTC",
      "postOnly": false,
      "ioc": false,
      "client_order_id": "",
      "positionSide": "LONG",
      "rpi": true,
      "reduceOnly": false
    }
  ],
  "stopOnFail": true,
  "request": "{{request}}",
  "nonce": "{{nonce}}"
}
'
[
  {
    "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,
      "reduceOnly": false
    },
    "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,
      "reduceOnly": false
    },
    "error": null
  }
]

Documentation Index

Fetch the complete documentation index at: https://whitebit-mintlify-fix-broken-links-1776643999.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The reduceOnly parameter documented on this page is coming soon. The documentation is published in advance for integration planning. The parameter is not yet accepted by the API. See Reduce-only orders for details.

Authorizations

X-TXC-APIKEY
string
header
required

The public WhiteBIT API key.

X-TXC-PAYLOAD
string
header
required

Base64-encoded JSON request body.

X-TXC-SIGNATURE
string
header
required

HMAC-SHA512 signature of the payload, hex-encoded. Computed as hex(HMAC-SHA512(payload, api_secret)).

Body

application/json
orders
object[]
stopOnFail
boolean
default:false

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
string
Example:

"{{request}}"

nonce
string
Example:

"{{nonce}}"

Response

Successful response - returns array of order results

result
object

Order data when successful, null when failed

error
object

Error details when order creation failed, null when successful