v1
latestOpenAPI 3.0.32026-07-2613529376.3 KBCollateral Trading
Collateral Limit Order
The endpoint creates a limit order using collateral balance. The order executes at the specified price or better. Use buy to open or increase a long position and sell to open or increase a short position. To close a position, place an opposite-side order matching the position amount.
Order validation rules (per-market, from GET /api/v4/public/markets):
- amount must have at most stockPrec decimal places
- price must have at most moneyPrec decimal places
- amount must be ≥ minAmount
- amount × price must be ≥ minTotal
- amount × price must be ≤ maxTotal (when maxTotal is not "0")
post/api/v4/order/collateral/limit
Request body
Example request
{
"market": "BTC_USDT",
"side": "buy",
"amount": "0.01",
"price": "40000",
"clientOrderId": "order1987111",
"stopLoss": "50000",
"takeProfit": "30000",
"rpi": true,
"positionSide": "LONG",
"stp": "no",
"request": "{{request}}",
"nonce": 1594297865000
}Response
Successful response - order created
Example response
{
"orderId": 4180284841,
"clientOrderId": "order1987111",
"market": "BTC_USDT",
"side": "buy",
"type": "limit",
"timestamp": 1595792396.165973,
"dealMoney": "0",
"dealStock": "0",
"amount": "0.01",
"left": "0.001",
"dealFee": "0",
"price": "40000",
"status": "FILLED",
"stp": "no",
"oto": {
"otoId": 29457221,
"stopLoss": "30000",
"takeProfit": "50000"
},
"positionSide": "LONG",
"rpi": true
}