交易接口/现货交易
说明:查询成交记录列表
group=tradeApi
version=0.0.1
bizType=tradeapi.app.SpotOrderApiService.queryTradeRecordPage{{company}}{{LoginResult.data.token}}en-UStradeApi{{mock_trace}}0.0.1每页条数
当前页
下载类型 1:直接下载,2:异步下载
H5:移动端web;PC_Web:pcweb;System:系统;Android:安卓原生app;iOS:苹果原生app;HOS:鸿蒙OS;PC_Win:pcwindows客户端;PC_Mac:pcmac客户端;默认同登录来源。(枚举仅供参考)
POST /api/global/tradeapi.app.OrderApiService.queryTradeRecordPage HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 274
{
"username": "text",
"size": 1,
"current": 1,
"downloadType": 1,
"sortFieldName": "text",
"sortType": "text",
"tradeType": "text",
"orderType": "text",
"symbolId": 1,
"executeStartTime": 1,
"executeEndTime": 1,
"direction": "text",
"accountIds": "text",
"querySource": "text",
"thirdPartyOrder": "text"
}{
"bizCode": "text",
"code": "text",
"msg": "text",
"tm": 1,
"trace": "text",
"msgParams": "text",
"data": {
"companyId": 1,
"customerId": 1,
"customerNo": "text",
"accountId": 1,
"trace": "text",
"ip": "text",
"lang": "text",
"size": 1,
"current": 1,
"totalPage": 1,
"list": [
{
"symbolId": 1,
"orderId": 1,
"dealId": 1,
"bizType": 1,
"symbolName": "text",
"direction": 1,
"requestPrice": "text",
"executePrice": "text",
"requestNum": "text",
"loanAmount": "text",
"executeTime": 1,
"outCurrency": "text",
"inCurrency": "text",
"stopLoss": "text",
"takeProfit": "text",
"commission": "text",
"profitLoss": "text",
"overnightInterest": "text",
"numberStatisticMode": 1,
"accountCurrency": "text",
"moneyAmountCurrency": "text",
"symbolCode": "text",
"tradeAmount": "text",
"executeNum": "text",
"executeAmount": "text",
"source": "text",
"thirdPartyOrder": "text"
}
],
"bizTypeText": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"ok": true,
"fail": true
}说明:现货玩法下单 登录后方可访问
group=tradeApi
version=0.0.1
bizType=tradeapi.app.OrderApiService.addOrder{{company}}{{LoginResult.data.token}}en-UStradeApi{{mock_trace}}0.0.1玩法类型,固定值5
订单业务类型(市价:12、限价:13)
订单买卖方向(买方向:1;卖方向:2)
产品ID
请求价格
请求数量(买方向,当请求金额;卖方向,当请求数量)
下单类型。1-按数量;2-按额;(如不传,默认 买按额,卖按量)
到期类型。1-1天;2-7天;3-30天;4-90天。默认4
H5:移动端web;PC_Web:pcweb;System:系统;Android:安卓原生app;iOS:苹果原生app;HOS:鸿蒙OS;PC_Win:pcwindows客户端;PC_Mac:pcmac客户端;默认同登录来源。(限制最高255字符,枚举仅供参考)
(限制最高255字符,只能使用字母、数字、下划线)
仅市价单有效。可为百分比(仅支持2位小数,超出部分按四舍五入处理)也可以时浮点型仅支持4位小数,超出部分按四舍五入处理)。其他格式不支持。
POST /api/global/tradeapi.app.OrderApiService.addOrder HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 254
{
"tradeType": 1,
"bizType": 1,
"direction": 1,
"symbolId": 1,
"accountCurrency": "text",
"requestTime": 1,
"requestPrice": 1,
"requestNum": 1,
"accountDigits": 1,
"remark": "text",
"entryType": 1,
"expiryType": "text",
"source": "text",
"thirdPartyOrder": "text",
"slippage": "text"
}{
"bizCode": "text",
"code": "text",
"msg": "text",
"tm": 1,
"trace": "text",
"msgParams": "text",
"data": {
"orderId": 1,
"tradeVolume": "text",
"executePrice": "text",
"openDirection": 1,
"direction": 1,
"symbolName": "text",
"symbolId": 1,
"digits": 1,
"fee": "text",
"lockToken": "text",
"inCurrency": "text",
"inDigits": 1,
"inAmount": 1
},
"ok": true,
"fail": true
}说明:分页查询账户资金流水 登录后方可访问
group=tradeApi
version=0.0.1
bizType=tradeapi.app.SpotOrderApiService.queryCapitalFlowList玩法类型
客户组Id
每页条数
当前页
POST /api/global/tradeapi.app.SpotOrderApiService.queryCapitalFlowList HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 186
{
"tradeType": 1,
"customerGroupId": 1,
"size": 1,
"current": 1,
"sortFieldName": "text",
"sortType": "text",
"businessType": 1,
"status": 1,
"customerNoStr": "text",
"startTime": 1,
"endTime": 1,
"operate": 1
}{
"bizCode": "text",
"code": "text",
"msg": "text",
"tm": 1,
"trace": "text",
"msgParams": "text",
"data": {
"records": [
{
"id": 1,
"remark": "text",
"createdBy": 1,
"createTime": 1,
"updateBy": 1,
"updateTime": 1,
"subjectId": 1,
"version": 1,
"bookkeepId": 1,
"amountIn": "text",
"amountOut": "text",
"status": 1,
"amountAfter": "text",
"businessType": 1,
"businessType1": 1,
"customerNo": "text",
"amount": "text",
"digits": 1,
"currency": "text",
"businessTypeName": "text",
"businessType1Name": "text",
"orderId": "text",
"dealId": "text"
}
],
"total": 1,
"size": 1,
"current": 1
},
"ok": true,
"fail": true
}说明:现货玩法取消限价单 登录后方可访问
group=tradeApi
version=0.0.1
bizType=tradeapi.app.SpotOrderApiService.closeTradePboOrder客户组Id
POST /api/global/tradeapi.app.SpotOrderApiService.closeTradePboOrder HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 63
{
"tradeType": 1,
"customerGroupId": 1,
"orderId": 1,
"remark": "text"
}{
"bizCode": "text",
"code": "text",
"msg": "text",
"tm": 1,
"trace": "text",
"msgParams": "text",
"data": {
"busiiType": 1,
"direction": 1,
"status": 1,
"userGroupId": 1,
"symbolId": 1,
"digits": 1,
"contractSize": 1,
"requestPrice": 1,
"requestNum": 1,
"requestTime": 1,
"executeMarginRate": 1,
"executeMarginRateDigits": 1,
"spread": 1,
"pointRatio": 1,
"executePrice": 1,
"executeRate": 1,
"rateDigits": 1,
"fee": 1,
"feeDigits": 1,
"executeTime": 1,
"createTime": 1,
"updateTime": 1,
"positionId": 1,
"stopLoss": 1,
"takeProfit": 1,
"remark": "text",
"executeAvgPrice": "text",
"source": "text",
"thirdPartyOrder": "text"
},
"ok": true,
"fail": true
}说明:查看订单列表
group=tradeApi
version=0.0.1
bizType=tradeapi.app.SpotOrderApiService.queryOrderPage{{company}}{{LoginResult.data.token}}en-UStradeApi{{mock_trace}}0.0.1客户组Id
每页条数
当前页
H5:移动端web;PC_Web:pcweb;System:系统;Android:安卓原生app;iOS:苹果原生app;HOS:鸿蒙OS;PC_Win:pcwindows客户端;PC_Mac:pcmac客户端;默认同登录来源。(枚举仅供参考)
POST /api/global/tradeapi.app.SpotOrderApiService.queryOrderPage HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 226
{
"tradeType": 1,
"customerGroupId": 1,
"size": 1,
"current": 1,
"sortFieldName": "text",
"sortType": "text",
"orderIds": "text",
"symbolId": 1,
"bizType": 1,
"direction": 1,
"status": 1,
"positionId": 1,
"querySource": "text",
"thirdPartyOrder": "text"
}{
"bizCode": "text",
"code": "text",
"msg": "text",
"tm": 1,
"trace": "text",
"msgParams": "text",
"data": {
"records": [
{
"busiiType": 1,
"direction": 1,
"status": 1,
"userGroupId": 1,
"symbolId": 1,
"digits": 1,
"contractSize": 1,
"requestPrice": 1,
"requestNum": 1,
"requestTime": 1,
"executeMarginRate": 1,
"executeMarginRateDigits": 1,
"spread": 1,
"pointRatio": 1,
"executePrice": 1,
"executeRate": 1,
"rateDigits": 1,
"fee": 1,
"feeDigits": 1,
"executeTime": 1,
"createTime": 1,
"updateTime": 1,
"positionId": 1,
"stopLoss": 1,
"takeProfit": 1,
"remark": "text",
"executeAvgPrice": "text",
"source": "text",
"thirdPartyOrder": "text"
}
],
"total": 1,
"size": 1,
"current": 1
},
"ok": true,
"fail": true
}说明:现货玩法查看订单详情 登录后方可访问
group=tradeApi
version=0.0.1
bizType=tradeapi.app.SpotOrderApiService.queryOrderDetailPOST /api/global/tradeapi.app.SpotOrderApiService.queryOrderDetail HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"orderId": 1
}{
"bizCode": "text",
"code": "text",
"msg": "text",
"tm": 1,
"trace": "text",
"msgParams": "text",
"data": {
"busiiType": 1,
"direction": 1,
"status": 1,
"userGroupId": 1,
"symbolId": 1,
"digits": 1,
"contractSize": 1,
"requestPrice": 1,
"requestNum": 1,
"requestTime": 1,
"executeMarginRate": 1,
"executeMarginRateDigits": 1,
"spread": 1,
"pointRatio": 1,
"executePrice": 1,
"executeRate": 1,
"rateDigits": 1,
"fee": 1,
"feeDigits": 1,
"executeTime": 1,
"createTime": 1,
"updateTime": 1,
"positionId": 1,
"stopLoss": 1,
"takeProfit": 1,
"remark": "text",
"executeAvgPrice": "text",
"source": "text",
"thirdPartyOrder": "text"
},
"ok": true,
"fail": true
}Last updated