|
|
@@ -33,6 +33,8 @@ type QueryErmcpTradePositionRsp struct {
|
|
|
OpenPL float64 `json:"openpl"` // 逐笔浮盈【实时行情更新】(MTP:开仓盈亏、平仓盈亏) 买方向 = (最新价 - 开仓均价) * 买期末头寸 * 合约单位;卖方向 = (开仓均价 - 最新价) * 卖期末头寸 * 合约单位
|
|
|
PositionPLRate float64 `json:"positionplrate"` // 持仓盈亏比例【实时行情更新】 = 持仓盈亏 / 开仓成本
|
|
|
UsedMargin float64 `json:"usedmargin"` // 占用保证金
|
|
|
+ ExExehangeID uint64 `json:"exexehangeid"` // 外部交易所id
|
|
|
+ ExExehangeCode string `json:"exexehangecode"` // 外部交易所代码
|
|
|
ExExehangeName string `json:"exexchangename"` // 外部交易所名称
|
|
|
OpenCost float64 `json:"opencost"` // 开仓成本
|
|
|
PositionCost float64 `json:"positioncost"` // 持仓成本
|
|
|
@@ -334,6 +336,8 @@ func QueryErmcpTradePosition(c *gin.Context) {
|
|
|
appG.Response(http.StatusBadRequest, e.ERROR_GET_EXEXCHANGE_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
+ item.ExExehangeID = exchange.Autoid
|
|
|
+ item.ExExehangeCode = exchange.Exexchangecode
|
|
|
item.ExExehangeName = exchange.Exchangefullname
|
|
|
// 获取对应商品盘面信息
|
|
|
quoteDays, err := models.GetQuoteDays("'" + goods.Outgoodscode + "'")
|