After the margin order is placed, you can modify the order before the order is fully executed,such as change the loss cut / profit taking price, whether to use XEX to pay the borrowing fees and automatically replenish the margin balance.etc.
1. Change the loss cut / profit taking price
2. Pay the borrowing fees with XEX
3. Automatically replenish the margin balance
Change the loss cut / profit taking price
/POST/api/v1/leverage/change/order
Url:
https://api.crossexchange.io/POST/api/v1/leverage/change/order
Request:
Name |
Type |
Description |
api_key |
String |
API KEY |
auth_nonce |
String |
Timestamp |
auth_sign |
String |
Sign: MD5coding.MD5( api_key+auth_nonce+ orderId+stopLossPrice+ stopProfitPrice) |
orderId |
Long |
The id of the order you want to change |
stopProfitPrice |
String |
The profit taking price you want to set |
stopLossPrice |
String |
The loss cut price you want to set |
Response:
{
"code": 0,
"data": { }
}
code |
String |
0: successful |
Pay the borrowing fees with XEX
Usually the interest generated by the borrowing is calculated and paid by USDT, but you can choose to use XEX to pay the borrowing fees.
The following api is used for this setting.
/POST/api/v1/modify/useXex
Url:
https://api.crossexchange.io/POST/api/v1/modify/useXex
Request:
Name |
Type |
Description |
api_key |
String |
API KEY |
auth_nonce |
String |
Timestamp |
auth_sign |
String |
Sign: MD5coding.MD5( api_key+auth_nonce+ orderId+stopLossPrice+ stopProfitPrice) |
orderId |
Long |
The id of the order you want to change |
isUseXex |
Long | Pay the borrowing fees with XEX. true: YES false : NO |
Response:
{
"code": 0,
"data": { }
}
code |
String |
0: successful |
Automatically replenish the margin balance
When a margin order's coverage does not meet the requirements, the system will automatically close the order.
If you don't want an order to be automatically closed because the coverage is too low, you can choose to automatically replenish the margin into an order. The premise of this is that your margin account needs to have enough balance.
/POST/api/v1/modify/autoDeposi
Url:
https://api.crossexchange.io/POST/api/v1/modify/autoDeposi
Request:
Name |
Type |
Description |
api_key |
String |
API KEY |
auth_nonce |
String |
Timestamp |
auth_sign |
String |
Sign: MD5coding.MD5(api_key+auth_nonce+orderId+stopLossPrice+stopProfitPrice) |
orderId |
Long |
The id of the order you want to change |
isAutoDeposit |
Long | Automatically replenish the margin balance. true: YES false : NO |
Response:
{
"code": 0,
"data": { }
}
code |
String |
0: successful |