Skip to main content

Bind TP/SL

Binds a take profit and/or stop loss to an existing position. At least one of takeProfitPrice or stopLossPrice must be set.

Request Parameters

NameTypeRequiredDescription
symbolStringYesMarket symbol
sideStringYesRequired in HEDGE mode — closes the specified position side — BUY · SELL
takeProfitPriceDoubleNoTake profit trigger price. At least one of takeProfitPrice or stopLossPrice must be set
takeProfitTriggerStringNomarkPrice (default) · lastPrice
stopLossPriceDoubleNoStop loss trigger price. At least one of takeProfitPrice or stopLossPrice must be set
stopLossTriggerStringNomarkPrice (default) · lastPrice
positionModeStringNoONE_WAY (default) · HEDGE · ISOLATED
positionIdStringNoRequired when positionMode is ISOLATED

Response Content

NameTypeDescription
symbolStringMarket symbol
orderIDStringOrder ID
clOrderIDStringCustom order ID
orderTypeInteger76: Limit · 77: Market · 80: Algo
sideStringTrade side
priceDoubleOrder price
statusIntegerOrder status code: 2 (ORDER_INSERTED) · 4 (FULLY_MATCHED) · 5 (PARTIAL_FILL) · 6 (CANCELLED) · 9 (TRIGGER_INSERTED) · 10 (TRIGGER_ACTIVATED) · 15 (REJECTED)
time_in_forceStringTime in force: GTC · IOC · FOK · HALFMIN · FIVEMIN · HOUR · TWELVEHOUR · DAY · WEEK · MONTH
timestampLongOrder timestamp
triggerBooleanWhether order is a trigger order
triggerPriceDoubleTrigger price (0 if not a trigger order)
avgFilledPriceDoubleAverage filled price
messageStringTrade message
stealthDoubleAlgo orders only
deviationDoubleAlgo orders only
remainingSizeIntegerCurrent order size minus filled size
originalOrderSizeIntegerOriginal quantity — unchanged after amendments
currentOrderSizeIntegerLatest quantity (filled + remaining)
filledSizeIntegerQuantity filled in this update
totalFilledSizeIntegerCumulative filled quantity
postOnlyBooleanWhether order is post-only
positionModeStringONE_WAY · HEDGE · ISOLATED
positionDirectionStringPosition direction: LONG · SHORT (only present in HEDGE/ISOLATED mode)
positionIdStringPosition ID
example
POSThttps://api.btse.com/futures/api/v2.3/order/bind/tpsl