Skip to main content

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

ParameterTypeRequiredDescription
symbolstringYesTrading pair symbol (e.g., BTCUSDT)
planTypestringYesPlan type: "TAKE_PROFIT" or "STOP_LOSS"
holdSidestringYesPosition side: "LONG" or "SHORT"
orderTypestringYesOrder type: "LIMIT" or "MARKET"
triggerPricestringYesTrigger price
triggerPriceTypestringYesTrigger price type: "LAST" or "MARK"
executePricestringNoExecution price (required for LIMIT)
sizestringYesOrder size
clientOidstringNoClient 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

ParameterTypeDescription
codestringResponse code
msgstringResponse message
requestTimenumberRequest timestamp in milliseconds
dataobjectOrder response data
> orderIdstringCreated order ID
> clientOidstringClient order ID

Response Example

Success Response

{
"code": "00000",
"msg": "success",
"requestTime": 1763459280000,
"data": {
"orderId": "fu-tpsl-123456789",
"clientOid": "my-tpsl-order-001"
}
}

Error Codes

CodeMessage
40001Position not found
40001Trigger price is required
40001Trigger price decimal precision is too high
40001Execute price is required
40001Execute price decimal precision is too high
40001Size is too large
40001Size is too small
40001Size decimal precision is too high