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
| Parameter | Type | Required | Description |
|---|---|---|---|
| productType | string | Yes | Product type. Only FUSD is supported |
| trackingNo | string | Yes | Copy position ID (tracking number) |
| stopSurplusPrice | string | Conditional | Take profit trigger price. At least one of stopSurplusPrice or stopLossPrice is required |
| stopSurplusTriggerPriceType | string | No | TP trigger price type: MARK or LAST. Default: LAST |
| stopSurplusOrderType | string | No | TP order type: MARKET or LIMIT. Default: MARKET |
| stopSurplusLimitPrice | string | No | TP limit price (required if stopSurplusOrderType is LIMIT) |
| stopSurplusAmountType | string | No | TP amount type: FULL or PARTIAL. Default: FULL |
| stopSurplusQuantity | string | No | TP quantity (required if stopSurplusAmountType is PARTIAL) |
| stopLossPrice | string | Conditional | Stop loss trigger price. At least one of stopSurplusPrice or stopLossPrice is required |
| stopLossTriggerPriceType | string | No | SL trigger price type: MARK or LAST. Default: LAST |
| stopLossOrderType | string | No | SL order type: MARKET or LIMIT. Default: MARKET |
| stopLossLimitPrice | string | No | SL limit price (required if stopLossOrderType is LIMIT) |
| stopLossAmountType | string | No | SL amount type: FULL or PARTIAL. Default: FULL |
| stopLossQuantity | string | No | SL 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
| Parameter | Type | Description |
|---|---|---|
| code | string | Response code |
| msg | string | Response message |
| requestTime | number | Request timestamp in milliseconds |
| data | object | Response data |
| > trackingNo | string | Tracking number |
| > result | string | Result message |
Response Example
{
"code": "00000",
"msg": "success",
"requestTime": 1763459280000,
"data": {
"trackingNo": "123456789",
"result": "success"
}
}
Error Codes
| Code | Message |
|---|---|
| 45001 | Parameter productType cannot be empty |
| 45001 | Invalid productType |
| 45001 | Parameter trackingNo cannot be empty |
| 45001 | One of stopSurplusPrice and stopLossPrice must be passed |
| 45002 | User not found |
| 45004 | Position not found |
| 45007 | Invalid take profit price |
| 45008 | Invalid stop loss price |
| 50000 | System error |