Create Orders
POST: /v1/future-u/trade/order/create
Content-Type: application/x-www-form-urlencoded && application/json
Parameters
Parameter | Type | Mandatory | Default | Description | Ranges |
---|---|---|---|---|---|
clientOrderId | string | false | N/A | Client order ID | |
symbol | string | true | Trading pair | ||
orderSide | string | true | N/A | Order side: BUY; SELL | BUY; SELL |
orderType | string | true | N/A | Order type: LIMIT; MARKET | LIMIT; MARKET |
origQty | number | true | N/A | Quantity (Cont) | |
price | number | false | N/A | Price | |
timeInForce | string | false | GTC | Valid way: GTC; IOC; FOK; GTX | GTC; IOC; FOK; GTX |
triggerProfitPrice | number | false | N/A | Stop profit price | |
triggerStopPrice | number | false | N/A | Stop loss price | |
positionSide | string | true | N/A | Position side: LONG; SHORT | LONG; SHORT |
OrigQty Calculation Formula
Formula origQty = Truncate ((Balance * Percent * Leverage ) / (Mark_price * Contract_size))
Explain
Truncate : take the integer part
Balance : (walletBalance - openOrderMarginFrozen) , api: /v1/future-u/user/compat/balance/list
Percent : user input , exp: 0.2
Leverage : leverage your want , exp: 20
Mark_price : current symobl mark price , exp: 88888 (btc_usdt)
Contract_size : contractSize , api: /v1/future-u/market/public/symbol/detail , Contract multiplier(face value)
Example
truncate(10000 * 0.2 * 20 / 88888 / 0.0001) = 4500
Limit Flow Rules
200/s/apikey
Response
{
"msgInfo": {
"code": "",
"msg": ""
},
"msg": "",
"data": {},
"code": 200
}