Skip to content

Place Order

Rate Limit: 10 req/sec/uid

Description

Place order

HTTP Request

  • POST /api/v1/futures/trade/place_order

Request Parameters

ParameterTypeRequiredDescription
symbolstringtrueTrading pair
qtystringtrueAmount (base coin)
pricestringfalsePrice of the order.
Required if the order type is LIMIT
sidestringtrueOrder direction
buy: BUY
sell: SELL
tradeSidestringtrueDirection
Only required in hedge-mode
Open and Close Notes:
For open long, side fill in"BUY"; tradeSide should be "OPEN"
For open short, side fill in "SELL"; tradeSide should be "OPEN"
For close long, side fill in "BUY"; tradeSide should be "CLOSE"
For close short, side fill in "SELL";tradeSide should be "CLOSE"
positionIdstringfalsePosition ID
Only required when "tradeSide" is "CLOSE"
orderTypestringtrueOrder type
LIMIT: limit orders
MARKET: market orders
effectstringfalseOrder expiration date.
Required if the orderType is limit
IOC: Immediate or cancel
FOK: Fill or kill
GTC: Good till canceled(default value)
POST_ONLY: POST only
clientIdstringfalseCustomize order ID
reduceOnlybooleanfalseWhether or not to just reduce the position
tpPricestringfalsetake profit trigger price
tpStopTypestringfalsetake profit trigger type
MARK_PRICE
LAST_PRICE
tpOrderTypestringfalsetake profit trigger place order type
LIMIT
MARKET
tpOrderPricestringfalsetake profit trigger place order price
LIMIT
MARKET
required if tpOrderType is LIMIT
slPricestringfalsestop loss trigger price
slStopTypestringfalsestop loss trigger type
MARK_PRICE
LAST_PRICE
slOrderTypestringfalsestop loss trigger place order type
LIMIT
MARKET
slOrderPricestringfalsestop loss trigger place order price
LIMIT
MARKET
required if slOrderType is LIMIT

Request Example

bash
curl -X 'POST'  --location 'https://fapi.bitunix.com/api/v1/futures/trade/place_order' \
   -H "api-key:*******" \
   -H "sign:*" \
   -H "time:1659076670000" \
   -H "language:en-US" \
   -H "Content-Type: application/json" \
 --data '{"symbol":"BTCUSDT","side":"BUY","price":"60000","qty":"0.5","positionId":"111","tradeSide":"CLOSE","orderType":"LIMIT","reduceOnly":false,"effect":"GTC","clientId":"1110000aaa","tpPrice":"61000","tpStopType":"MARK","tpOrderType":"LIMIT","tpOrderPrice":"61000.1"}'

Response Parameters

ParameterTypeDescription
orderIdstringorder id
clientIdstringclient id

Response Example

json
{"code":0,"data":{"orderId":"11111","clientId":"22222"},"msg":"Success"}