Place TP/SL Order
Place a new take-profit or stop-loss order for an existing position.
HTTP Request
POST /api/v1/future/order/place-tpsl-order
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Trading pair symbol (e.g., BTCUSDT) |
| planType | string | Yes | Plan type: "TAKE_PROFIT" or "STOP_LOSS" |
| holdSide | string | Yes | Position side: "LONG" or "SHORT" |
| orderType | string | Yes | Order type: "LIMIT" or "MARKET" |
| triggerPrice | string | Yes | Trigger price |
| triggerPriceType | string | Yes | Trigger price type: "LAST" or "MARK" |
| executePrice | string | No | Execution price (required for LIMIT) |
| size | string | Yes | Order size |
| clientOid | string | No | Client order ID |
Request Example
curl -X POST "https://open-api.bydoxe.com/api/v1/future/order/place-tpsl-order" \
-H "ACCESS-KEY: your-api-key" \
-H "ACCESS-SIGN: your-signature" \
-H "ACCESS-PASSPHRASE: your-passphrase" \
-H "ACCESS-TIMESTAMP: 1659076670000" \
-H "Content-Type: application/json" \
-d '{
"symbol": "BTCUSDT",
"planType": "TAKE_PROFIT",
"holdSide": "LONG",
"orderType": "LIMIT",
"triggerPrice": "42000.00",
"triggerPriceType": "MARK",
"executePrice": "41950.00",
"size": "0.5",
"clientOid": "my-tpsl-order-001"
}'
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | string | Response code |
| msg | string | Response message |
| requestTime | number | Request timestamp in milliseconds |
| data | object | Order response data |
| > orderId | string | Created order ID |
| > clientOid | string | Client order ID |
Response Example
Success Response
{
"code": "00000",
"msg": "success",
"requestTime": 1763459280000,
"data": {
"orderId": "fu-tpsl-123456789",
"clientOid": "my-tpsl-order-001"
}
}
Error Codes
| Code | Message |
|---|---|
| 40001 | Position not found |
| 40001 | Trigger price is required |
| 40001 | Trigger price decimal precision is too high |
| 40001 | Execute price is required |
| 40001 | Execute price decimal precision is too high |
| 40001 | Size is too large |
| 40001 | Size is too small |
| 40001 | Size decimal precision is too high |