跳到主要内容

获取用户订单请求

根据订单号/位置号获取用户订单信息

请求地址

  • 接口地址 (requestURI) : /api/v1/request/getUserOrder

请求参数

参数名称类型要求说明
loginLongR管理员账号
accountLoginLongR当前账号登录
orderLongR订单号
positionDoubleR持仓号
symbolStringR订单符号

请求示例

{
"login": 100001,
"accountLogin": 200000252,
"orderNo": 204925,
"positionNo": 204926,
"symbol": "UKOIL"
}

响应参数

  • 持仓信息
参数名称类型要求描述
loginIntegerR登录 ID
symbolStringR订单符号
actionIntegerR操作类型
digitsIntegerR位数
digitsCurrencyIntegerR货币位数
contractSizeDoubleR合约大小
positionIntegerR仓位 ID
externalIdStringR外部 ID
timeCreateIntegerR创建时间
timeUpdateIntegerR更新时间
timeCreateMscIntegerR创建时间(毫秒)
timeUpdateMscIntegerR更新时间(毫秒)
priceOpenDoubleR开仓价
priceCurrentDoubleR现价
priceSlDoubleR止损价
priceTpDoubleR获利价
volumeIntegerR交易量
volumeExtIntegerR扩大交易量
profitsDoubleR利润
storageDoubleR存储
rateProfitDoubleR利润率
rateMarginDoubleR保证金率
expertIDIntegerR专家ID
expertPositionIDIntegerR专家仓位ID
commentStringR评论
dealIntegerR经销商ID
enActivationModeIntegerR激活模式
activityTimeIntegerR激活时间
activityPriceDoubleR激活价格
apiDataObjectRAPI 数据
modifiedFlagsIntegerR修改标志
reasonIntegerR原因
activatedFlagsIntegerR激活标志
  • 订单信息
参数名称类型要求描述
orderIntegerR订单 ID
externalIDStringR外部 ID
loginIntegerR登录 ID
dealIntegerR经销商 ID
symbolStringR订单符号
digitsIntegerR位数
digitsCurrencyIntegerR货币位数
contractSizeDoubleR合约大小
stateIntegerR订单状态
ReasonIntegerR订单原因
timeSetupIntegerR设置时间
timeSetupMscIntegerR设置时间(毫秒)
timeExpirationIntegerR到期时间
timeDoneIntegerR完成时间
timeDoneMscIntegerR完成时间(毫秒)
typeIntegerR订单类型
typeFillIntegerR订单填充类型
typeTimeIntegerR订单时间类型
priceOrderDoubleR订单价格
priceTriggerDoubleR触发价格
priceCurrentDoubleR当前价格
priceSLDoubleR止损价
priceTPDoubleR获利价
volumeInitialIntegerR初始交易量
volumeInitialExtIntegerR扩展初始交易量
volumeCurrentIntegerR当前交易量
volumeCurrentExtIntegerR扩展的当前交易量
expertIDIntegerR专家 ID
positionIDIntegerR仓位 ID
positionByIDIntegerR仓位 ID
commentStringR评论
activationModeIntegerR激活模式
activationTimeIntegerR激活时间
activationPriceDoubleR激活价格
activationFlagsIntegerR激活标志
apiDataObjectOAPI 数据
rateMarginDoubleR保证金率
modificationFlagsIntegerR修改标志
  • 成交信息
参数名称类型要求描述
dealIntegerR交易ID
externalIDStringR外部ID
loginIntegerR登录ID
dealerIntegerR交易员ID
orderIntegerR订单ID
actionIntegerR动作类型
entryIntegerR条目类型
digitsIntegerR数字数量
digitsCurrencyIntegerR货币数字数量
contractSizeFloatR合同大小
timeIntegerR交易时间
symbolStringR交易符号
priceFloatR交易价格
priceSLFloatR止损价格
priceTPFloatR获利价格
volumeIntegerR交易量
volumeExtIntegerR扩展交易量
volumeClosedIntegerR已关闭交易量
volumeClosedExtIntegerR扩展已关闭交易量
profitFloatR利润
valueFloatR
storageFloatR存储
commissionFloatR佣金
feeFloatR费用
rateProfitFloatR利润率
rateMarginFloatR保证金率
expertIDIntegerR专家ID
positionIDIntegerR位置ID
commentStringR评论
profitRawFloatR原始利润
pricePositionFloatR位置价格
tickValueFloatR刻度值
tickSizeFloatR刻度大小
flagsIntegerR标志
timeMscIntegerR毫秒时间
reasonIntegerR原因
gatewayStringR网关
priceGatewayFloatR网关价格
marketBidFloatR市场出价
marketAskFloatR市场询价
marketLastFloatR最后市场价格
modificationFlagsIntegerR修改标志

示例响应

{
"code": "200",
"desc": "Success",
"data": {
"position": {
"login": 200000252,
"symbol": "UKOIL",
"action": 0,
"digits": 2,
"digitsCurrency": 2,
"contractSize": 1000.0,
"position": 336925,
"externalId": "",
"timeCreate": 1733213182,
"timeUpdate": 1733213182,
"timeCreateMsc": 1733213182230,
"timeUpdateMsc": 1733213182230,
"priceOpen": 72.27,
"priceCurrent": 72.51,
"priceSl": 0.0,
"priceTp": 0.0,
"volume": 1000,
"volumeExt": 10000000,
"profit": 24.0,
"storage": 0.0,
"rateProfit": 1.0,
"rateMargin": 1.0,
"expertID": 0,
"expertPositionID": 336925,
"comment": "",
"dealer": 5,
"enActivationMode": 0,
"activationTime": 0,
"activationPrice": 0.0,
"apiData": {
"appId": 0,
"id": 0,
"value": 0,
"pos": 0
},
"modificationFlags": 0,
"reason": 2,
"activationFlags": 65
},
"imtOrderList": [
{
"order": 336925,
"externalID": "1729346341",
"login": 200000252,
"dealer": 5,
"symbol": "UKOIL",
"digits": 2,
"digitsCurrency": 2,
"contractSize": 1000.0,
"state": 4,
"reason": 2,
"timeSetup": 1733213182,
"timeSetupMsc": 1733213182144,
"timeExpiration": 0,
"timeDone": 1733213182,
"timeDoneMsc": 1733213182230,
"type": 0,
"typeFill": 0,
"typeTime": 0,
"priceOrder": 72.27,
"priceTrigger": 0.0,
"priceCurrent": 72.27,
"priceSL": 0.0,
"priceTP": 0.0,
"volumeInitial": 1000,
"volumeInitialExt": 10000000,
"volumeCurrent": 0,
"volumeCurrentExt": 0,
"expertID": 0,
"positionID": 336925,
"positionByID": 0,
"comment": "",
"activationMode": 0,
"activationTime": 0,
"activationPrice": 0.0,
"activationFlags": 65,
"apiData": null,
"rateMargin": 1.0,
"modificationFlags": 0
}
],
"imtDealList": [
{
"deal": 204116,
"externalID": "1740170623",
"login": 200000252,
"dealer": 5,
"order": 336925,
"action": 0,
"entry": 0,
"digits": 2,
"digitsCurrency": 2,
"contractSize": 1000.0,
"time": 1733213182,
"symbol": "UKOIL",
"price": 72.27,
"priceSL": 0.0,
"priceTP": 0.0,
"volume": 1000,
"volumeExt": 10000000,
"volumeClosed": 0,
"volumeClosedExt": 0,
"profit": 0.0,
"value": 0.0,
"storage": 0.0,
"commission": 0.0,
"fee": 0.0,
"rateProfit": 0.0,
"rateMargin": 1.0,
"expertID": 0,
"positionID": 336925,
"comment": "",
"profitRaw": 0.0,
"pricePosition": 0.0,
"tickValue": 0.0,
"tickSize": 0.0,
"flags": 0,
"timeMsc": 1733213182230,
"reason": 2,
"gateway": "MT5GWTSMPL",
"priceGateway": 72.27,
"marketBid": 72.22,
"marketAsk": 72.27,
"marketLast": 0.0,
"modificationFlags": 0
}
]
}
}