Skip to main content

Modify TP/SL Order

Modify an existing take-profit or stop-loss order.

HTTP Request

POST /api/v1/future/order/modify-tpsl-order

Request Parameters

ParameterTypeRequiredDescription
orderIdstringNoOrder ID (either orderId or clientOid required)
clientOidstringNoClient order ID (either orderId or clientOid required)
symbolstringYesTrading pair symbol (e.g., BTCUSDT)
orderTypestringNoOrder type: "LIMIT" or "MARKET"
triggerPricestringNoNew trigger price
triggerPriceTypestringNoTrigger price type: "LAST" or "MARK"
executePricestringNoNew execution price
sizestringNoNew order size

Request Example

curl -X POST "https://open-api.bydoxe.com/api/v1/future/order/modify-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 '{
"orderId": "fu-tpsl-123456789",
"clientOid": "my-tpsl-order-001",
"symbol": "BTCUSDT",
"orderType": "LIMIT",
"triggerPrice": "42500.00",
"triggerPriceType": "LAST",
"executePrice": "42450.00",
"size": "0.6"
}'

Response Parameters

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

Response Example

Success Response

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

Error Codes

CodeMessage
40001TPSL Order not found
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
40026Order ID or client order ID is required