Skip to content

Place TP/SL Order

Rate Limit: 10 req/sec/UID

Description

Place TP/SL Order

HTTP Request

  • POST /api/v1/futures/tpsl/place_order

Request Parameters

ParameterTypeRequiredDescription
symbolstringtrueTrading pair
positionIdstringtruePosition ID associated with take-profit and stop-loss
tpPricestringfalseTake-profit trigger price
At least one of tpPrice or slPrice is required.
tpStopTypestringfalseTake-profit trigger type
LAST_PRICE
MARK_PRICE
Default is market price.
slPricestringfalseStop-loss trigger price
At least one of tpPrice or slPrice is required.
slStopTypestringfalseStop-loss trigger type
LAST_PRICE
MARK_PRICE
Default is market price.
tpOrderTypestringfalseTake-profit order type
LIMIT
MARKET
Default is market.
tpOrderPricestringfalseTake-profit order price
slOrderTypestringfalseStop-loss order type
LIMIT
MARKET
Default is market.
slOrderPricestringfalseStop-loss order price
tpQtystringfalseTake-profit order quantity(base coin)
At least one of tpQty or slQty is required.
slQtystringfalseStop-loss order quantity(base coin)
At least one of tpQty or slQty is required.

Request Example

bash
curl -X 'POST'  --location 'https://fapi.bitunix.com/api/v1/futures/tpsl/place_order' \
   -H "api-key:*******" \
   -H "sign:*" \
   -H "time:1659076670000" \
   -H "language:en-US" \
   -H "Content-Type: application/json" \
 --data '{"symbol":"BTCUSDT","positionId":"111","tpPrice":"12","tpStopType":"LAST_PRICE","slPrice":"9","slStopType":"LAST_PRICE","tpOrderType":"LIMIT","tpOrderPrice":"11","slOrderType":"LIMIT","slOrderPrice":"8","tpQty":"1","slQty":"1"}'

Response Parameters

ParameterTypeDescription
orderIdstringTP/SL Order ID

Response Example

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