交易接口/现货交易

查询成交记录列表

post

说明:查询成交记录列表

group=tradeApi
version=0.0.1
bizType=tradeapi.app.SpotOrderApiService.queryTradeRecordPage
Header parameters
companyIdstringOptionalExample: {{company}}
tokenstringOptionalExample: {{LoginResult.data.token}}
langstringOptionalExample: en-US
groupstringOptionalExample: tradeApi
tracestringOptionalExample: {{mock_trace}}
versionstringOptionalExample: 0.0.1
Body
usernamestringOptional
sizeinteger · int64Optional

每页条数

currentinteger · int64Optional

当前页

downloadTypeinteger · int32Optional

下载类型 1:直接下载,2:异步下载

sortFieldNamestringOptional
sortTypestringOptional
tradeTypestringOptional
orderTypestringOptional
symbolIdinteger · int64Optional
executeStartTimeinteger · int64Optional
executeEndTimeinteger · int64Optional
directionstringOptional
accountIdsstringOptional
querySourcestringOptional

H5:移动端web;PC_Web:pcweb;System:系统;Android:安卓原生app;iOS:苹果原生app;HOS:鸿蒙OS;PC_Win:pcwindows客户端;PC_Mac:pcmac客户端;默认同登录来源。(枚举仅供参考)

thirdPartyOrderstringOptional
Responses
200Success
application/json
post
/global/tradeapi.app.OrderApiService.queryTradeRecordPage
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"
}
200Success
{
  "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
}

下单

post

说明:现货玩法下单 登录后方可访问

group=tradeApi
version=0.0.1
bizType=tradeapi.app.OrderApiService.addOrder
Header parameters
companyIdstringOptionalExample: {{company}}
tokenstringOptionalExample: {{LoginResult.data.token}}
langstringOptionalExample: en-US
groupstringOptionalExample: tradeApi
tracestringOptionalExample: {{mock_trace}}
versionstringOptionalExample: 0.0.1
Body
tradeTypeinteger · int64 · min: 1Required

玩法类型,固定值5

bizTypeinteger · int32Required

订单业务类型(市价:12、限价:13)

directioninteger · int32Required

订单买卖方向(买方向:1;卖方向:2)

symbolIdinteger · int64Required

产品ID

accountCurrencystringOptional
requestTimeinteger · int64Optional
requestPricenumberRequired

请求价格

requestNumnumberRequired

请求数量(买方向,当请求金额;卖方向,当请求数量)

accountDigitsinteger · int32Optional
remarkstringOptional
entryTypeinteger · int32Optional

下单类型。1-按数量;2-按额;(如不传,默认 买按额,卖按量)

expiryTypestringOptional

到期类型。1-1天;2-7天;3-30天;4-90天。默认4

sourcestringOptional

H5:移动端web;PC_Web:pcweb;System:系统;Android:安卓原生app;iOS:苹果原生app;HOS:鸿蒙OS;PC_Win:pcwindows客户端;PC_Mac:pcmac客户端;默认同登录来源。(限制最高255字符,枚举仅供参考)

thirdPartyOrderstringOptional

(限制最高255字符,只能使用字母、数字、下划线)

slippagestringOptional

仅市价单有效。可为百分比(仅支持2位小数,超出部分按四舍五入处理)也可以时浮点型仅支持4位小数,超出部分按四舍五入处理)。其他格式不支持。

Responses
200Success
application/json
post
/global/tradeapi.app.OrderApiService.addOrder
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"
}
200Success
{
  "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
}

资金流水

post

说明:分页查询账户资金流水 登录后方可访问

group=tradeApi
version=0.0.1
bizType=tradeapi.app.SpotOrderApiService.queryCapitalFlowList
Body
tradeTypeinteger · int64 · min: 1Required

玩法类型

customerGroupIdinteger · int64Required

客户组Id

sizeinteger · int64Optional

每页条数

currentinteger · int64Optional

当前页

sortFieldNamestringOptional
sortTypestringOptional
businessTypeinteger · int32Optional
statusinteger · int32Optional
customerNoStrstringOptional
startTimeinteger · int64Optional
endTimeinteger · int64Optional
operateinteger · int32Optional
Responses
200Success
application/json
post
/global/tradeapi.app.SpotOrderApiService.queryCapitalFlowList
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
}
200Success
{
  "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
}

取消限价单

post

说明:现货玩法取消限价单 登录后方可访问

group=tradeApi
version=0.0.1
bizType=tradeapi.app.SpotOrderApiService.closeTradePboOrder
Body
tradeTypeinteger · int64 · min: 1Required
customerGroupIdinteger · int64Required

客户组Id

orderIdinteger · int64Required
remarkstringOptional
Responses
200Success
application/json
post
/global/tradeapi.app.SpotOrderApiService.closeTradePboOrder
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"
}
200Success
{
  "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
}

查看订单列表

post

说明:查看订单列表

group=tradeApi
version=0.0.1
bizType=tradeapi.app.SpotOrderApiService.queryOrderPage
Header parameters
companyIdstringOptionalExample: {{company}}
tokenstringOptionalExample: {{LoginResult.data.token}}
langstringOptionalExample: en-US
groupstringOptionalExample: tradeApi
tracestringOptionalExample: {{mock_trace}}
versionstringOptionalExample: 0.0.1
Body
tradeTypeinteger · int64 · min: 1Required
customerGroupIdinteger · int64Required

客户组Id

sizeinteger · int64Optional

每页条数

currentinteger · int64Optional

当前页

sortFieldNamestringOptional
sortTypestringOptional
orderIdsstringOptional
symbolIdinteger · int64Optional
bizTypeinteger · int64Optional
directioninteger · int64Optional
statusinteger · int64Optional
positionIdinteger · int64Optional
querySourcestringOptional

H5:移动端web;PC_Web:pcweb;System:系统;Android:安卓原生app;iOS:苹果原生app;HOS:鸿蒙OS;PC_Win:pcwindows客户端;PC_Mac:pcmac客户端;默认同登录来源。(枚举仅供参考)

thirdPartyOrderstringOptional
Responses
200Success
application/json
post
/global/tradeapi.app.SpotOrderApiService.queryOrderPage
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"
}
200Success
{
  "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
}

查看订单详情

post

说明:现货玩法查看订单详情 登录后方可访问

group=tradeApi
version=0.0.1
bizType=tradeapi.app.SpotOrderApiService.queryOrderDetail
Body
orderIdinteger · int64Optional
Responses
200Success
application/json
post
/global/tradeapi.app.SpotOrderApiService.queryOrderDetail
POST /api/global/tradeapi.app.SpotOrderApiService.queryOrderDetail HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 13

{
  "orderId": 1
}
200Success
{
  "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