v1
latestOpenAPI 3.0.32026-07-2613529376.3 KBCollateral Trading
Collateral bulk limit order
The endpoint creates multiple collateral limit orders 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>post/api/v4/order/collateral/bulk
Request body
Example request
{
"orders": [
{
"market": "BTC_PERP",
"side": "buy",
"amount": "0.02",
"price": "40000",
"stopLoss": "50000",
"takeProfit": "30000",
"rpi": true,
"positionSide": "LONG"
}
],
"stopOnFail": true,
"request": "{{request}}",
"nonce": 1594297865000
}Response
Successful response - returns array of order results
Example response
[
{
"result": {
"orderId": 4326248250,
"market": "BTC_USDT",
"side": "buy",
"type": "limit",
"timestamp": 1684916268.825564,
"dealMoney": "641.988",
"dealStock": "0.02",
"amount": "0.02",
"left": "0",
"dealFee": "1.283976",
"price": "40000",
"status": "FILLED",
"stp": "no",
"positionSide": "LONG",
"rpi": true
},
"error": {
"code": 32,
"message": "Validation failed",
"errors": {
"amount": [
"Given amount is less than min amount 0.001."
]
}
}
}
]