Bind TP/SL
POST🔒 Trading
Binds a take profit and/or stop loss to an existing position.
At least one of takeProfitPrice or stopLossPrice must be set.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| symbol | String | Yes | Market symbol |
| side | String | Yes | Required in HEDGE mode — closes the specified position side — BUY · SELL |
| takeProfitPrice | Double | No | Take profit trigger price. At least one of takeProfitPrice or stopLossPrice must be set |
| takeProfitTrigger | String | No | markPrice (default) · lastPrice |
| stopLossPrice | Double | No | Stop loss trigger price. At least one of takeProfitPrice or stopLossPrice must be set |
| stopLossTrigger | String | No | markPrice (default) · lastPrice |
| positionMode | String | No | ONE_WAY (default) · HEDGE · ISOLATED |
| positionId | String | No | Required when positionMode is ISOLATED |
Response Content
| Name | Type | Description |
|---|---|---|
| symbol | String | Market symbol |
| orderID | String | Order ID |
| clOrderID | String | Custom order ID |
| orderType | Integer | 76: Limit · 77: Market · 80: Algo |
| side | String | Trade side |
| price | Double | Order price |
| status | Integer | Order status code: 2 (ORDER_INSERTED) · 4 (FULLY_MATCHED) · 5 (PARTIAL_FILL) · 6 (CANCELLED) · 9 (TRIGGER_INSERTED) · 10 (TRIGGER_ACTIVATED) · 15 (REJECTED) |
| time_in_force | String | Time in force: GTC · IOC · FOK · HALFMIN · FIVEMIN · HOUR · TWELVEHOUR · DAY · WEEK · MONTH |
| timestamp | Long | Order timestamp |
| trigger | Boolean | Whether order is a trigger order |
| triggerPrice | Double | Trigger price (0 if not a trigger order) |
| avgFilledPrice | Double | Average filled price |
| message | String | Trade message |
| stealth | Double | Algo orders only |
| deviation | Double | Algo orders only |
| remainingSize | Integer | Current order size minus filled size |
| originalOrderSize | Integer | Original quantity — unchanged after amendments |
| currentOrderSize | Integer | Latest quantity (filled + remaining) |
| filledSize | Integer | Quantity filled in this update |
| totalFilledSize | Integer | Cumulative filled quantity |
| postOnly | Boolean | Whether order is post-only |
| positionMode | String | ONE_WAY · HEDGE · ISOLATED |
| positionDirection | String | Position direction: LONG · SHORT (only present in HEDGE/ISOLATED mode) |
| positionId | String | Position ID |
example
POST
https://api.btse.com/futures/api/v2.3/order/bind/tpsl