The requirement for a margin order is that your margin account must have sufficient balance. Before placing a margin order, please transfer assets from your wallet to your margin account.
The following api demonstrates how to place a new margin order.
/POST/api/v1/make/leverOrder
URL:
https://api.crossexchange.io/POST/api/v1/make/leverOrder
Request field:
Name | Type | |
api_key |
String |
API KEY |
|
String |
Timestamp |
auth_sign |
String |
MD5coding.MD5( api_key+auth_nonce+ isAutoDeposit+isBid+ isUseXex+number+ pair+poolId+price+ rate+stopLossPrice+ stopProfitPrice+apiSecret ) |
pairId |
String |
Trading pair, eg. BTC_USDT |
isBid |
Boolean |
true of false |
number |
BigDecimal |
amount of you want to place |
price |
BigDecimal |
price |
rate |
int |
Leverage rate,the value is 2,4,6,8 or 10. |
stopProfitPrice |
BigDecimal |
Profit Taking Price (Optional) |
stopLossPrice |
BigDecimal |
Loss Cut Price (Optional) |
isAutoDeposit |
Boolean |
Automatically replenish the margin balance true:Yes |
isUseXex |
Boolean |
Pay the borrowing fees with XEX true:Yes |
poolId |
String |
Mining in pool, you can type 1-4 to specify the corresponding mining pool, the value as follows. 1: Mining 90 2: Mining 60 3: Mining 30 |
Response:
{
"code": 0,
"data": {
"result": true,
"orderId": "570998877491062784"
},
"channel": "auth-leverage-make-order"
}
code |
String |
0 Successful the other value is failed |
|
Boolean |
true:successful false:failed |
|
String |
order id |
|
String |
API type |