Skip to main content

Modify Take Profit / Stop Loss

Modify the take profit (TP) and stop loss (SL) settings for a tracking position.

HTTP Request

POST /api/v1/copy/mix-trader/order-modify-tpsl

Request Parameters

ParameterTypeRequiredDescription
trackingNostringYesPosition ID (tracking number)
productTypestringYesProduct type. Only FUSD is supported
stopSurplusPricestringConditionalTake profit trigger price. At least one of stopSurplusPrice or stopLossPrice is required
stopSurplusTriggerPriceTypestringNoTP trigger price type: MARK or LAST. Default: LAST
stopSurplusOrderTypestringNoTP order type: MARKET or LIMIT. Default: MARKET
stopSurplusLimitPricestringNoTP limit price (required if stopSurplusOrderType is LIMIT)
stopSurplusAmountTypestringNoTP amount type: FULL or PARTIAL. Default: FULL
stopSurplusQuantitystringNoTP quantity (required if stopSurplusAmountType is PARTIAL)
stopLossPricestringConditionalStop loss trigger price. At least one of stopSurplusPrice or stopLossPrice is required
stopLossTriggerPriceTypestringNoSL trigger price type: MARK or LAST. Default: LAST
stopLossOrderTypestringNoSL order type: MARKET or LIMIT. Default: MARKET
stopLossLimitPricestringNoSL limit price (required if stopLossOrderType is LIMIT)
stopLossAmountTypestringNoSL amount type: FULL or PARTIAL. Default: FULL
stopLossQuantitystringNoSL quantity (required if stopLossAmountType is PARTIAL)

Request Example

curl -X POST "https://open-api.bydoxe.com/api/v1/copy/mix-trader/order-modify-tpsl" \
-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 '{
"trackingNo": "123456789",
"productType": "FUSD",
"stopSurplusPrice": "42000.00",
"stopSurplusTriggerPriceType": "LAST",
"stopSurplusOrderType": "MARKET",
"stopLossPrice": "38000.00",
"stopLossTriggerPriceType": "MARK",
"stopLossOrderType": "LIMIT",
"stopLossLimitPrice": "37900.00"
}'

Response Parameters

ParameterTypeDescription
codestringResponse code
msgstringResponse message
requestTimenumberRequest timestamp in milliseconds
datastringResult message

Response Example

{
"code": "00000",
"msg": "success",
"requestTime": 1763459280000,
"data": "success"
}

Error Codes

CodeMessage
45001Parameter trackingNo cannot be empty
45001Parameter productType cannot be empty
45001Invalid productType
45001One of stopSurplusPrice and stopLossPrice must be passed
45002User not found
45003Not a copy trader
45004Position not found
45007Invalid take profit price
45008Invalid stop loss price
50000System error