Skip to content

Place Position TP/SL Order

Rate Limit: 10 req/sec/UID

Description

Place Position TP/SL OrderWhen triggered, it will close the position at market price based on the position quantity at that time.Each position can only have one Position TP/SL Order

HTTP Request

  • POST /api/v1/futures/tpsl/position/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.

Request Example

bash
curl -X 'POST'  --location 'https://fapi.bitunix.com/api/v1/futures/tpsl/position/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"}'

Response Parameters

ParameterTypeDescription
orderIdstringTP/SL Order ID

Response Example

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