Trade/Leveraged
Description: Contract margin trading order group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.addOrder
{{company}}{{LoginResult.data.token}}en-UStradeApi{{mock_trace}}0.0.1Should be filled with 2 for this game
Optional. If filled, trading will be conducted with this account
Business type. 1-Market order; 12-Market by amount order; 13-Limit order
1-Buy; 2-Sell;
13-digit timestamp
Needs to be multiplied by 10 to the power of 'product price decimal places' and passed as an integer. Only for order recording, not the actual transaction price.
Operation type. 1- Normal; 2- Automatic borrowing; 3- Automatic repayment
Required for pending orders, expiration type 1. Valid on the same day 2. Valid for the same week
POST /api/global/tradeapi.app.OrderApiService.addOrder HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 223
{
"tradeType": 1,
"accountId": 1,
"bizType": 1,
"direction": 1,
"symbolId": 1,
"requestTime": 1,
"requestPrice": "text",
"requestNum": "text",
"remark": "text",
"accountCurrency": "text",
"accountDigits": 1,
"operationType": 1,
"expireType": "text"
}{
"msg": "Success",
"fail": false,
"trace": "x-dqxq8-qu20y7y-dq58lhn-39i483-1677570581",
"code": "0",
"data": {
"tradeVolume": "0.1",
"symbolId": 720,
"orderId": 14460002,
"fee": "-0.0668",
"openOrClose": 1,
"openPrice": "22.25",
"takeProfit": "0",
"positionId": 2023022819810,
"interest": "0",
"openDirection": 1,
"stopLoss": "0",
"executePrice": "22.25",
"digits": 2,
"symbolName": "BINAN_SOL_USDT",
"profit": "0",
"direction": 1
},
"bizCode": "",
"tm": 162,
"msgParams": null,
"ok": true
}Explanation: Set position stop loss and take profit group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.updateOrder
{{company}}{{LoginResult.data.token}}en-UStradeApi{{mock_trace}}0.0.1Fill in 3 for this gameplay
Needs to be multiplied by 10 to the power of 'product quote decimal places', processed as an integer and passed in.
Needs to be multiplied by 10 to the power of 'product quote decimal places', processed as an integer and passed in.
POST /api/global/tradeapi.app.CrossLeverOrderApiService.updateOrder HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 153
{
"tradeType": 1,
"accountId": 1,
"accountCurrency": "text",
"orderId": 1,
"positionId": 1,
"accountDigits": 1,
"stopLoss": "text",
"takeProfit": "text",
"remark": "text"
}{
"msg": "Account balance is 0",
"fail": true,
"trace": "x-0ei175a-x4dh9u2-1g8s95r-m2708212-1677570735",
"code": "E000031",
"data": "tradeapi.app.OrderApiService.updateOrder",
"bizCode": "CFD",
"tm": 7,
"msgParams": null,
"ok": false
}Explanation: Query transaction record list
group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.queryTradeRecordPage
{{company}}{{LoginResult.data.token}}en-UStradeApi{{mock_trace}}0.0.1Should be filled with 2 for this game
Multiple separated by commas
executeTime-transaction time; direction-direction; symbolId-product id;
desc-Descending order; asc-Ascending order;
-1-all; 1-buy; 2-sell;
-1-all; 1-open; 2-close; 3-market price; 4-limit price;
13-digit timestamp
13-digit timestamp
Default 1
Default 20
POST /api/global/tradeapi.app.CrossLeverOrderApiService.queryTradeRecordPage HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 178
{
"tradeType": 1,
"accountIds": "text",
"sortFieldName": "text",
"sortType": "text",
"symbolId": 1,
"direction": 1,
"orderType": 1,
"executeStartTime": 1,
"executeEndTime": 1,
"current": 1,
"size": 1
}{
"msg": "Success",
"fail": false,
"trace": "x-w864w4d-7143je-n2w23-0124-1677573722",
"code": "0",
"data": {
"accountId": null,
"current": 1,
"trace": "x-w864w4d-7143je-n2w23-0124-1677573722",
"companyId": 360,
"size": 20,
"totalPage": 0,
"ip": "47.242.92.158",
"customerId": 1176,
"bizTypeText": {
"1": "Market Open",
"2": "Pre-set Limit Open",
"3": "Pre-set Stop Loss Open",
"4": "Market Close",
"5": "Stop profit Close",
"6": "Stop Loss Close",
"7": "System Close",
"8": "Expiry Close",
"9": "Limit Open"
},
"list": [],
"lang": "en-US",
"customerNo": "86001175"
},
"bizCode": "",
"tm": 7,
"msgParams": null,
"ok": true
}group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.previewOrder
{{company}}{{LoginResult.data.token}}en-UStradeApi{{mock_trace}}0.0.1Should be filled with 2 for this game
Source currency
Target currency
Total asset currency
Request Quantity
Order request time
Remarks
POST /api/global/tradeapi.app.CrossLeverOrderApiService.previewOrder HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 136
{
"tradeType": 1,
"sourceCurrency": "text",
"targetCurrency": "text",
"customerCurrency": "text",
"requestNum": 1,
"requestTime": 1,
"remark": "text"
}{
"msg": "Success",
"fail": false,
"trace": "x-11wdkt-kg9i-ld2y-53mz854-1677571927",
"code": "0",
"data": {
"symbolId": 720,
"orderId": 14460003,
"dealId": 94870543,
"canReduceMargin": "0.0000",
"openPrice": "22.18",
"remark": null,
"takeProfitDecimal": "0.00",
"closeNum": 0,
"closeFee": "0.0000",
"takeProfit": "0",
"occupyTheMargin": "0.0000",
"interest": "0.0000",
"maintenanceMargin": "0.0000",
"closeVolume": 0,
"openVolume": 0.1,
"closeTime": 0,
"closeAccountDigits": 4,
"symbolName": "BINAN_SOL_USDT",
"openTime": 1677571033093,
"profit": null,
"tradeType": 1,
"direction": 1,
"singleMargin": null,
"margin": null,
"openContractSize": 1,
"resp": null,
"openMargin": "0.2209",
"openNum": 0.1,
"openFee": "0.0665",
"closeSymbolDigits": 2,
"warningMargin": "0.0000",
"stopLossDecimal": "0.00",
"adjustCrossLevel": "1-100",
"openSymbolDigits": 2,
"volume": 0.1,
"accountId": 1031767,
"companyId": 360,
"positionId": 2023022819827,
"closeFreeDigits": null,
"stopLoss": "0",
"minVolume": null,
"marginSetType": "2",
"crossLevelNum": 10,
"openAccountDigits": 4,
"closePrice": "0.0000",
"status": "1"
},
"bizCode": "C",
"tm": 27,
"msgParams": null,
"ok": true
}group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.addRepaymentOrder
{{company}}{{LoginResult.data.token}}en-UStradeApi{{mock_trace}}0.0.1Should be filled with 2 for this game
Source currency
Target currency
Total asset currency
Request Quantity
Order request time
Remarks
POST /api/global/tradeapi.app.CrossLeverOrderApiService.addRepaymentOrder HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 136
{
"tradeType": 1,
"sourceCurrency": "text",
"targetCurrency": "text",
"customerCurrency": "text",
"requestNum": 1,
"requestTime": 1,
"remark": "text"
}{
"msg": "Success",
"fail": false,
"trace": "x-11wdkt-kg9i-ld2y-53mz854-1677571927",
"code": "0",
"data": {
"symbolId": 720,
"orderId": 14460003,
"dealId": 94870543,
"canReduceMargin": "0.0000",
"openPrice": "22.18",
"remark": null,
"takeProfitDecimal": "0.00",
"closeNum": 0,
"closeFee": "0.0000",
"takeProfit": "0",
"occupyTheMargin": "0.0000",
"interest": "0.0000",
"maintenanceMargin": "0.0000",
"closeVolume": 0,
"openVolume": 0.1,
"closeTime": 0,
"closeAccountDigits": 4,
"symbolName": "BINAN_SOL_USDT",
"openTime": 1677571033093,
"profit": null,
"tradeType": 1,
"direction": 1,
"singleMargin": null,
"margin": null,
"openContractSize": 1,
"resp": null,
"openMargin": "0.2209",
"openNum": 0.1,
"openFee": "0.0665",
"closeSymbolDigits": 2,
"warningMargin": "0.0000",
"stopLossDecimal": "0.00",
"adjustCrossLevel": "1-100",
"openSymbolDigits": 2,
"volume": 0.1,
"accountId": 1031767,
"companyId": 360,
"positionId": 2023022819827,
"closeFreeDigits": null,
"stopLoss": "0",
"minVolume": null,
"marginSetType": "2",
"crossLevelNum": 10,
"openAccountDigits": 4,
"closePrice": "0.0000",
"status": "1"
},
"bizCode": "C",
"tm": 27,
"msgParams": null,
"ok": true
}Explanation: Pagination query account capital flow group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.queryCapitalFlowList
{{company}}{{LoginResult.data.token}}en-UStradeApi{{mock_trace}}0.0.1Should be filled with 2 for this game
0-Unrestricted; 1-Deposit; 2-Withdrawal; 3-System reset; 4-Limit adjustment; 5-Freeze; 6-Transaction; 36-Transfer; 42-Reward;
0-Unrestricted; 1-Initialization; 2-Processing successful; 3-Processing failed;
13-digit timestamp
13-digit timestamp
0-Unrestricted; 1-Increase; 2-Decrease;
POST /api/global/tradeapi.app.CrossLeverOrderApiService.queryCapitalFlowList HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 143
{
"tradeType": 1,
"accountId": 1,
"size": 1,
"current": 1,
"businessType": 1,
"status": 1,
"startTime": 1,
"endTime": 1,
"operate": 1,
"assetsId": 1,
"lang": "text"
}{
"msg": "Success",
"fail": false,
"trace": "x-n72ql-snasw1-ts561r-31e7q-1677572540",
"code": "0",
"data": {
"total": 40,
"current": 1,
"size": 20,
"records": [
{
"amount": "-0.0665",
"businessType1": 6001,
"amountAfter": "109849175.3769",
"businessType1Name": "Open position fee",
"updateTime": 1677571033166,
"remark": null,
"version": 0,
"subjectId": 1504110734228991000,
"accountId": 1031767,
"createTime": 1677571033151,
"businessTypeName": "transaction",
"createdBy": null,
"updateBy": null,
"bookkeepId": 2023022819827,
"currency": "USDT",
"digits": 4,
"amountIn": "0.0000",
"amountOut": "0.0665",
"id": 238603703,
"businessType": 6,
"customerNo": "86001175",
"status": 2
}
]
},
"bizCode": "A",
"tm": 13,
"msgParams": null,
"ok": true
}Last updated