Skip to main content

Create Orders

POST: /v1/future-u/trade/order/create

Content-Type: application/x-www-form-urlencoded && application/json

Parameters

ParameterTypeMandatoryDefaultDescriptionRanges
clientOrderIdstringfalseN/AClient order ID
symbolstringtrueTrading pair
orderSidestringtrueN/AOrder side: BUY; SELLBUY; SELL
orderTypestringtrueN/AOrder type: LIMIT; MARKETLIMIT; MARKET
origQtynumbertrueN/AQuantity (Cont)
pricenumberfalseN/APrice
timeInForcestringfalseGTCValid way: GTC; IOC; FOK; GTXGTC; IOC; FOK; GTX
triggerProfitPricenumberfalseN/AStop profit price
triggerStopPricenumberfalseN/AStop loss price
positionSidestringtrueN/APosition side: LONG; SHORTLONG; 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
}