Close Positions
Close an open tracking position.
HTTP Request
POST /api/v1/copy/mix-trader/order-close-positions
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| trackingNo | string | Yes | Position ID (tracking number) |
| symbol | string | Yes | Trading pair symbol (e.g., BTCUSDT) |
| productType | string | Yes | Product type. Only FUSD is supported |
| orderType | string | No | Order type: LIMIT or MARKET. Default: MARKET |
| quantity | string | No | Close quantity. Default: full position |
| price | string | Conditional | Close price. Required for LIMIT orders |
Request Example
curl -X POST "https://open-api.bydoxe.com/api/v1/copy/mix-trader/order-close-positions" \
-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",
"symbol": "BTCUSDT",
"productType": "FUSD",
"orderType": "MARKET",
"quantity": "0.5"
}'
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 |
| > clientOid | string | Client order ID |
Response Example
{
"code": "00000",
"msg": "success",
"requestTime": 1763459280000,
"data": {
"trackingNo": "123456789",
"clientOid": "uuid-order-id"
}
}
Error Codes
| Code | Message |
|---|---|
| 45001 | Parameter trackingNo cannot be empty |
| 45001 | Parameter symbol cannot be empty |
| 45001 | Parameter productType cannot be empty |
| 45001 | Invalid productType |
| 45001 | Parameter price is required for LIMIT orders |
| 45001 | Invalid quantity parameter |
| 45002 | User not found |
| 45003 | Not a copy trader |
| 45004 | Position not found |
| 45006 | Order already in progress |
| 50001 | Failed to get current price |
| 50000 | System error |