Skip to main content

Set Take Profit / Stop Loss

Set the take profit (TP) and stop loss (SL) for a copy trading position.

HTTP Request

POST /api/v1/copy/mix-follower/setting-tpsl

Request Parameters

ParameterTypeRequiredDescription
productTypestringYesProduct type. Only FUSD is supported
trackingNostringYesCopy position ID (tracking number)
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-follower/setting-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 '{
"productType": "FUSD",
"trackingNo": "123456789",
"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
dataobjectResponse data
> trackingNostringTracking number
> resultstringResult message

Response Example

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

Error Codes

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