Bläddra i källkod

1、增加查询盘面的接口;
2、修改子账户查询不到头寸的问题。

zhou.xiaoning 4 år sedan
förälder
incheckning
4671d59b4c
10 ändrade filer med 2054 tillägg och 147 borttagningar
  1. 14 0
      controllers/ermcp/qryOrder.go
  2. 314 0
      controllers/quote/quote.go
  3. 536 0
      docs/docs.go
  4. 536 0
      docs/swagger.json
  5. 396 0
      docs/swagger.yaml
  6. 120 17
      models/ermcpOrder.go
  7. 8 1
      models/goods.go
  8. 124 129
      models/quote.go
  9. 2 0
      routers/router.go
  10. 4 0
      utils/mathUtils.go

+ 14 - 0
controllers/ermcp/qryOrder.go

@@ -320,6 +320,8 @@ func QueryErmcpTradePosition(c *gin.Context) {
 				// 	item.PositionPL = (item.Last - item.AveragePrice) * float64(v.Buycurpositionqty) * goods.Agreeunit
 				// }
 				// FIXME: - 与老邓及王旭讨论过后,确认后期头寸相关价格会由交易服务落地,目前暂不进行计算
+
+				rsp = append(rsp, item)
 			}
 			if v.Sellcurpositionqty > 0 {
 				// 卖方向
@@ -400,6 +402,8 @@ func QueryErmcpTradePosition(c *gin.Context) {
 				// 计算持仓盈亏:卖方向持仓盈亏 = (持仓价 - 最新价) * 数量 * 合约单位
 				// 知识点:交易服务在结算后,会按结算价更新持仓单金额,所以持仓均价就是持仓价(结算价)
 				// 知识点:持仓盈亏是今日浮动盈亏,针对结算价进行计算;平仓盈亏是针对建仓价进行计算
+
+				rsp = append(rsp, item)
 			}
 		}
 	}
@@ -408,3 +412,13 @@ func QueryErmcpTradePosition(c *gin.Context) {
 	logger.GetLogger().Debugln("QueryErmcpTradePosition successed: %v", rsp)
 	appG.Response(http.StatusOK, e.SUCCESS, rsp)
 }
+
+// QueryErmcpOrderDetailReq 获取企业风管期货委托单信息请求参数
+type QueryErmcpOrderDetailReq struct {
+	AccountID int `form:"accountID" binding:"required"`
+	MarketID  int `form:"marketID"`
+}
+
+type QueryErmcpOrderDetailRsp struct {
+	OrderType int `json:"ordertype"` //
+}

+ 314 - 0
controllers/quote/quote.go

@@ -0,0 +1,314 @@
+package quote
+
+import (
+	"fmt"
+	"mtp2_if/global/app"
+	"mtp2_if/global/e"
+	"mtp2_if/logger"
+	"mtp2_if/models"
+	"mtp2_if/utils"
+	"net/http"
+	"strings"
+	"time"
+
+	"github.com/gin-gonic/gin"
+)
+
+// QueryQuoteDayReq 获取商品盘面信息请求参数
+type QueryQuoteDayReq struct {
+	GoodsCodes string `form:"goodsCodes" binding:"required"`
+}
+
+// QueryQuoteDayRsp 获取商品盘面信息返回模型
+type QueryQuoteDayRsp struct {
+	Exchangedate         int64     `json:"exchangedate"`         // 交易日
+	Goodscode            string    `json:"goodscode"`            // 商品代码
+	Exchangecode         int       `json:"exchangecode"`         // 交易所代码
+	Preclose             float64   `json:"preclose"`             // 昨收
+	Opentime             time.Time `json:"opentime"`             // 开盘时间
+	Opened               float64   `json:"opened"`               // 开盘价
+	Highest              float64   `json:"highest"`              // 最高价
+	Lowest               float64   `json:"lowest"`               // 最低价
+	Lasttime             string    `json:"lasttime"`             // 行情时间(只有现价变化行情时间才变化)
+	Utclasttime          time.Time `json:"utclasttime"`          // utc的行情时间
+	Last                 float64   `json:"last"`                 // 最新价
+	Lastvolume           int64     `json:"lastvolume"`           // 最新成交量
+	Lastturnover         float64   `json:"lastturnover`          // 最新成交金额
+	Totalbidvolume       int64     `json:"totalbidvolume"`       // 外盘
+	Totalaskvolume       int64     `json:"totalaskvolume"`       // 内盘
+	Totalvolume          int64     `json:"totalvolume"`          // 总量
+	Totalturnover        float64   `json:"totalturnover"`        // 总金额
+	Bid                  float64   `json:"bid"`                  // 买1
+	Bid2                 float64   `json:"bid2"`                 // 买2
+	Bid3                 float64   `json:"bid3"`                 // 买3
+	Bid4                 float64   `json:"bid4"`                 // 买4
+	Bid5                 float64   `json:"bid5"`                 // 买5
+	Bidvolume            int64     `json:"bidvolume"`            // 买量1
+	Bidvolume2           int64     `json:"bidvolume2"`           // 买量2
+	Bidvolume3           int64     `json:"bidvolume3"`           // 买量3
+	Bidvolume4           int64     `json:"bidvolume4"`           // 买量4
+	Bidvolume5           int64     `json:"bidvolume5"`           // 买量5
+	Ask                  float64   `json:"ask"`                  // 卖1
+	Ask2                 float64   `json:"ask2"`                 // 卖2
+	Ask3                 float64   `json:"ask3"`                 // 卖3
+	Ask4                 float64   `json:"ask4"`                 // 卖4
+	Ask5                 float64   `json:"ask5"`                 // 卖5
+	Askvolume            int64     `json:"askvolume"`            // 卖量1
+	Askvolume2           int64     `json:"askvolume2"`           // 卖量2
+	Askvolume3           int64     `json:"askvolume3"`           // 卖量3
+	Askvolume4           int64     `json:"askvolume4"`           // 卖量4
+	Askvolume5           int64     `json:"askvolume5"`           // 卖量5
+	Presettle            float64   `json:"presettle"`            // 昨结价
+	Settle               float64   `json:"settle"`               // 结算价
+	Preholdvolume        int64     `json:"preholdvolume"`        // 昨持仓
+	Holdvolume           int64     `json:"holdvolume"`           // 持仓
+	Averageprice         float64   `json:"averageprice"`         // 均价
+	Orderid              int64     `json:"orderid"`              // 序号
+	Limitup              float64   `json:"limitup"`              // 涨停价
+	Limitdown            float64   `json:"limitdown"`            // 跌停价
+	Inventory            int64     `json:"inventory"`            // 库存
+	Holdincrement        int64     `json:"holdincrement"`        // 单笔持仓
+	Iscleared            int       `json:"iscleared"`            // 是否清盘标志
+	Issettled            int       `json:"issettled"`            // 是否结算标志
+	Bidqueueinfo         string    `json:"bidqueueinfo"`         // 大利市买港股用
+	Askqueueinfo         string    `json:"askqueueinfo"`         // 大利市卖港股用
+	Bidorderid           int64     `json:"bidorderid"`           // 买单号1
+	Bidorderid2          int64     `json:"bidorderid2"`          // 买单号2
+	Bidorderid3          int64     `json:"bidorderid3"`          // 买单号3
+	Bidorderid4          int64     `json:"bidorderid4"`          // 买单号4
+	Bidorderid5          int64     `json:"bidorderid5"`          // 买单号5
+	Askorderid           int64     `json:"askorderid"`           // 卖单号1
+	Askorderid2          int64     `json:"askorderid2"`          // 卖单号2
+	Askorderid3          int64     `json:"askorderid3"`          // 卖单号3
+	Askorderid4          int64     `json:"askorderid4"`          // 卖单号4
+	Askorderid5          int64     `json:"askorderid5"`          // 卖单号5
+	Lastlot              int64     `json:"lastlot"`              // 最新成交手数
+	Totallot             int64     `json:"totallot"`             // 总手数
+	Strikeprice          float64   `json:"strikeprice"`          // 发行价
+	Cleartime            int64     `json:"cleartime"`            // 清盘时间
+	Calloptionpremiums   int64     `json:"calloptionpremiums"`   // 认购期权1
+	Calloptionpremiums2  int64     `json:"calloptionpremiums2"`  // 认购期权2
+	Calloptionpremiums3  int64     `json:"calloptionpremiums3"`  // 认购期权3
+	Calloptionpremiums4  int64     `json:"calloptionpremiums4"`  // 认购期权4
+	Calloptionpremiums5  int64     `json:"calloptionpremiums5"`  // 认购期权5
+	Putoptionpremiums    int64     `json:"putoptionpremiums"`    // 认沽期权1
+	Putoptionpremiums2   int64     `json:"putoptionpremiums2"`   // 认沽期权2
+	Putoptionpremiums3   int64     `json:"putoptionpremiums3"`   // 认沽期权3
+	Putoptionpremiums4   int64     `json:"putoptionpremiums4"`   // 认沽期权4
+	Putoptionpremiums5   int64     `json:"putoptionpremiums5"`   // 认沽期权5
+	Nontotalvolume       int64     `json:"nontotalvolume"`       // 非交易总量
+	Nontotalholdervolume int64     `json:"nontotalholdervolume"` // 非交易持仓量
+	Nontotalturnover     int64     `json:"nontotalturnover"`     // 非交易总金额
+	Nontotallot          int64     `json:"nontotallot"`          // 非交易总手数
+	Publictradetype      string    `json:"publictradetype"`      // 公共交易标志类型 港股专用
+	Iep                  float64   `json:"iep"`                  // 平衡价 港股专用
+	Iev                  float64   `json:"iev"`                  // 平衡量 港股专用
+	Grepmarketprice      float64   `json:"grepmarketprice"`      // 暗盘价 港股专用
+	Bid6                 float64   `json:"bid6"`                 // 买6
+	Bid7                 float64   `json:"bid7"`                 // 买7
+	Bid8                 float64   `json:"bid8"`                 // 买8
+	Bid9                 float64   `json:"bid9"`                 // 买9
+	Bid10                float64   `json:"bid10"`                // 买10
+	Bidvolume6           int64     `json:"bidvolume6"`           // 买量6
+	Bidvolume7           int64     `json:"bidvolume7"`           // 买量7
+	Bidvolume8           int64     `json:"bidvolume8"`           // 买量8
+	Bidvolume9           int64     `json:"bidvolume9"`           // 买量9
+	Bidvolume10          int64     `json:"bidvolume10"`          // 买量10
+	Ask6                 float64   `json:"ask6"`                 // 卖6
+	Ask7                 float64   `json:"ask7"`                 // 卖7
+	Ask8                 float64   `json:"ask8"`                 // 卖8
+	Ask9                 float64   `json:"ask9"`                 // 卖9
+	Ask10                float64   `json:"ask10"`                // 卖10
+	Askvolume6           int64     `json:"askvolume6"`           // 卖量6
+	Askvolume7           int64     `json:"askvolume7"`           // 卖量7
+	Askvolume8           int64     `json:"askvolume8"`           // 卖量8
+	Askvolume9           int64     `json:"askvolume9"`           // 卖量9
+	Askvolume10          int64     `json:"askvolume10"`          // 卖量10
+	Bidordervolume       int64     `json:"bidordervolume"`       // 买单量1
+	Bidordervolume2      int64     `json:"bidordervolume2"`      // 买单量2
+	Bidordervolume3      int64     `json:"bidordervolume3"`      // 买单量3
+	Bidordervolume4      int64     `json:"bidordervolume4"`      // 买单量4
+	Bidordervolume5      int64     `json:"bidordervolume5"`      // 买单量5
+	Bidordervolume6      int64     `json:"bidordervolume6"`      // 买单量6
+	Bidordervolume7      int64     `json:"bidordervolume7"`      // 买单量7
+	Bidordervolume8      int64     `json:"bidordervolume8"`      // 买单量8
+	Bidordervolume9      int64     `json:"bidordervolume9"`      // 买单量9
+	Bidordervolume10     int64     `json:"bidordervolume10"`     // 买单量10
+	Askordervolume       int64     `json:"askordervolume"`       // 卖单量1
+	Askordervolume2      int64     `json:"askordervolume2"`      // 卖单量2
+	Askordervolume3      int64     `json:"askordervolume3"`      // 卖单量3
+	Askordervolume4      int64     `json:"askordervolume4"`      // 卖单量4
+	Askordervolume5      int64     `json:"askordervolume5"`      // 卖单量5
+	Askordervolume6      int64     `json:"askordervolume6"`      // 卖单量6
+	Askordervolume7      int64     `json:"askordervolume7"`      // 卖单量7
+	Askordervolume8      int64     `json:"askordervolume8"`      // 卖单量8
+	Askordervolume9      int64     `json:"askordervolume9"`      // 卖单量9
+	Askordervolume10     int64     `json:"askordervolume10"`     // 卖单量10
+}
+
+// QueryQuoteDay 获取商品盘面信息
+// @Summary 获取商品盘面信息
+// @Produce json
+// @Security ApiKeyAuth
+// @Param goodsCodes query string true "商品代码列表,格式:CU2102,CU2103,AL2107"
+// @Success 200 {object} QueryQuoteDayRsp
+// @Failure 500 {object} app.Response
+// @Router /Quote/QueryQuoteDay [get]
+// @Tags 行情服务
+func QueryQuoteDay(c *gin.Context) {
+	appG := app.Gin{C: c}
+
+	// 获取请求参数
+	var req QueryQuoteDayReq
+	if err := appG.C.ShouldBindQuery(&req); err != nil {
+		logger.GetLogger().Errorf("QueryQuoteDay failed: %s", err.Error())
+		appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
+		return
+	}
+
+	rsp := make([]QueryQuoteDayRsp, 0)
+	// 构建查询GoodsCodes
+	goodsCodes := fmt.Sprintf("'%s'", req.GoodsCodes)
+	goodsCodes = strings.Replace(goodsCodes, ",", "','", -1)
+	quoteDays, err := models.GetQuoteDays(goodsCodes)
+	if err != nil {
+		logger.GetLogger().Errorf("QueryQuoteDay failed: %s", err.Error())
+		appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
+		return
+	}
+	for _, v := range quoteDays {
+		// 获取对应的商品信息
+		goods, _ := models.GetGoodsByGoodsCode(v.Goodscode)
+		if goods != nil {
+			rsp = append(rsp, QueryQuoteDayRsp{
+				Exchangedate:         v.Exchangedate,
+				Goodscode:            v.Goodscode,
+				Exchangecode:         v.Exchangecode,
+				Preclose:             utils.IntToFloat64(int(v.Preclose), int(goods.Decimalplace)),
+				Opentime:             time.Unix(int64(v.Opentime), 0),
+				Opened:               utils.IntToFloat64(int(v.Opened), int(goods.Decimalplace)),
+				Highest:              utils.IntToFloat64(int(v.Highest), int(goods.Decimalplace)),
+				Lowest:               utils.IntToFloat64(int(v.Lowest), int(goods.Decimalplace)),
+				Lasttime:             v.Lasttime,
+				Utclasttime:          time.Unix(int64(v.Utclasttime), 0),
+				Last:                 utils.IntToFloat64(int(v.Last), int(goods.Decimalplace)),
+				Lastvolume:           v.Lastvolume,
+				Lastturnover:         float64(v.Lastturnover),
+				Totalbidvolume:       v.Totalbidvolume,
+				Totalaskvolume:       v.Totalaskvolume,
+				Totalvolume:          v.Totalvolume,
+				Totalturnover:        float64(v.Totalturnover),
+				Bid:                  utils.IntToFloat64(int(v.Bid), int(goods.Decimalplace)),
+				Bid2:                 utils.IntToFloat64(int(v.Bid2), int(goods.Decimalplace)),
+				Bid3:                 utils.IntToFloat64(int(v.Bid3), int(goods.Decimalplace)),
+				Bid4:                 utils.IntToFloat64(int(v.Bid4), int(goods.Decimalplace)),
+				Bid5:                 utils.IntToFloat64(int(v.Bid5), int(goods.Decimalplace)),
+				Bidvolume:            v.Bidvolume,
+				Bidvolume2:           v.Bidvolume2,
+				Bidvolume3:           v.Bidvolume3,
+				Bidvolume4:           v.Bidvolume4,
+				Bidvolume5:           v.Bidvolume5,
+				Ask:                  utils.IntToFloat64(int(v.Ask), int(goods.Decimalplace)),
+				Ask2:                 utils.IntToFloat64(int(v.Ask2), int(goods.Decimalplace)),
+				Ask3:                 utils.IntToFloat64(int(v.Ask3), int(goods.Decimalplace)),
+				Ask4:                 utils.IntToFloat64(int(v.Ask4), int(goods.Decimalplace)),
+				Ask5:                 utils.IntToFloat64(int(v.Ask5), int(goods.Decimalplace)),
+				Askvolume:            v.Askvolume,
+				Askvolume2:           v.Askvolume2,
+				Askvolume3:           v.Askvolume3,
+				Askvolume4:           v.Askvolume4,
+				Askvolume5:           v.Askvolume5,
+				Presettle:            utils.IntToFloat64(int(v.Presettle), int(goods.Decimalplace)),
+				Settle:               utils.IntToFloat64(int(v.Settle), int(goods.Decimalplace)),
+				Preholdvolume:        v.Preholdvolume,
+				Holdvolume:           v.Holdvolume,
+				Averageprice:         utils.IntToFloat64(int(v.Averageprice), int(goods.Decimalplace)),
+				Orderid:              v.Orderid,
+				Limitup:              utils.IntToFloat64(int(v.Limitup), int(goods.Decimalplace)),
+				Limitdown:            utils.IntToFloat64(int(v.Limitdown), int(goods.Decimalplace)),
+				Inventory:            v.Inventory,
+				Holdincrement:        v.Holdincrement,
+				Iscleared:            v.Iscleared,
+				Issettled:            v.Issettled,
+				Bidqueueinfo:         v.Bidqueueinfo,
+				Askqueueinfo:         v.Askqueueinfo,
+				Bidorderid:           v.Bidorderid,
+				Bidorderid2:          v.Bidorderid2,
+				Bidorderid3:          v.Bidorderid3,
+				Bidorderid4:          v.Bidorderid4,
+				Bidorderid5:          v.Bidorderid5,
+				Askorderid:           v.Askorderid,
+				Askorderid2:          v.Askorderid2,
+				Askorderid3:          v.Askorderid3,
+				Askorderid4:          v.Askorderid4,
+				Askorderid5:          v.Askorderid5,
+				Lastlot:              v.Lastlot,
+				Totallot:             v.Totallot,
+				Strikeprice:          utils.IntToFloat64(int(v.Strikeprice), int(goods.Decimalplace)),
+				Cleartime:            v.Cleartime,
+				Calloptionpremiums:   v.Calloptionpremiums,
+				Calloptionpremiums2:  v.Calloptionpremiums2,
+				Calloptionpremiums3:  v.Calloptionpremiums3,
+				Calloptionpremiums4:  v.Calloptionpremiums4,
+				Calloptionpremiums5:  v.Calloptionpremiums5,
+				Putoptionpremiums:    v.Putoptionpremiums,
+				Putoptionpremiums2:   v.Putoptionpremiums2,
+				Putoptionpremiums3:   v.Putoptionpremiums3,
+				Putoptionpremiums4:   v.Putoptionpremiums4,
+				Putoptionpremiums5:   v.Putoptionpremiums5,
+				Nontotalvolume:       v.Nontotalvolume,
+				Nontotalholdervolume: v.Nontotalholdervolume,
+				Nontotalturnover:     v.Nontotalturnover,
+				Nontotallot:          v.Nontotallot,
+				Publictradetype:      v.Publictradetype,
+				Iep:                  utils.IntToFloat64(int(v.Iep), int(goods.Decimalplace)),
+				Iev:                  utils.IntToFloat64(int(v.Iev), int(goods.Decimalplace)),
+				Grepmarketprice:      utils.IntToFloat64(int(v.Grepmarketprice), int(goods.Decimalplace)),
+				Bid6:                 utils.IntToFloat64(int(v.Bid6), int(goods.Decimalplace)),
+				Bid7:                 utils.IntToFloat64(int(v.Bid7), int(goods.Decimalplace)),
+				Bid8:                 utils.IntToFloat64(int(v.Bid8), int(goods.Decimalplace)),
+				Bid9:                 utils.IntToFloat64(int(v.Bid9), int(goods.Decimalplace)),
+				Bid10:                utils.IntToFloat64(int(v.Bid10), int(goods.Decimalplace)),
+				Bidvolume6:           v.Bidvolume6,
+				Bidvolume7:           v.Bidvolume7,
+				Bidvolume8:           v.Bidvolume8,
+				Bidvolume9:           v.Bidvolume9,
+				Bidvolume10:          v.Bidvolume10,
+				Ask6:                 utils.IntToFloat64(int(v.Ask6), int(goods.Decimalplace)),
+				Ask7:                 utils.IntToFloat64(int(v.Ask7), int(goods.Decimalplace)),
+				Ask8:                 utils.IntToFloat64(int(v.Ask8), int(goods.Decimalplace)),
+				Ask9:                 utils.IntToFloat64(int(v.Ask9), int(goods.Decimalplace)),
+				Ask10:                utils.IntToFloat64(int(v.Ask10), int(goods.Decimalplace)),
+				Askvolume6:           v.Askvolume6,
+				Askvolume7:           v.Askvolume7,
+				Askvolume8:           v.Askvolume8,
+				Askvolume9:           v.Askvolume9,
+				Askvolume10:          v.Askvolume10,
+				Bidordervolume:       v.Bidordervolume,
+				Bidordervolume2:      v.Bidordervolume2,
+				Bidordervolume3:      v.Bidordervolume3,
+				Bidordervolume4:      v.Bidordervolume4,
+				Bidordervolume5:      v.Bidordervolume5,
+				Bidordervolume6:      v.Bidordervolume6,
+				Bidordervolume7:      v.Bidordervolume7,
+				Bidordervolume8:      v.Bidordervolume8,
+				Bidordervolume9:      v.Bidordervolume9,
+				Bidordervolume10:     v.Bidordervolume10,
+				Askordervolume:       v.Askordervolume,
+				Askordervolume2:      v.Askordervolume2,
+				Askordervolume3:      v.Askordervolume3,
+				Askordervolume4:      v.Askordervolume4,
+				Askordervolume5:      v.Askordervolume5,
+				Askordervolume6:      v.Askordervolume6,
+				Askordervolume7:      v.Askordervolume7,
+				Askordervolume8:      v.Askordervolume8,
+				Askordervolume9:      v.Askordervolume9,
+				Askordervolume10:     v.Askordervolume10,
+			})
+		}
+	}
+
+	// 查询成功
+	logger.GetLogger().Debugln("QueryQuoteDay successed: %v", rsp)
+	appG.Response(http.StatusOK, e.SUCCESS, rsp)
+}

+ 536 - 0
docs/docs.go

@@ -4880,6 +4880,45 @@ var doc = `{
                 }
             }
         },
+        "/Quote/QueryQuoteDay": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "行情服务"
+                ],
+                "summary": "获取商品盘面信息",
+                "parameters": [
+                    {
+                        "type": "string",
+                        "description": "商品代码列表,格式:CU2102,CU2103,AL2107",
+                        "name": "goodsCodes",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/quote.QueryQuoteDayRsp"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Quote/QueryTSData": {
             "get": {
                 "produces": [
@@ -16377,6 +16416,503 @@ var doc = `{
                 }
             }
         },
+        "quote.QueryQuoteDayRsp": {
+            "type": "object",
+            "properties": {
+                "ask": {
+                    "description": "卖1",
+                    "type": "number"
+                },
+                "ask10": {
+                    "description": "卖10",
+                    "type": "number"
+                },
+                "ask2": {
+                    "description": "卖2",
+                    "type": "number"
+                },
+                "ask3": {
+                    "description": "卖3",
+                    "type": "number"
+                },
+                "ask4": {
+                    "description": "卖4",
+                    "type": "number"
+                },
+                "ask5": {
+                    "description": "卖5",
+                    "type": "number"
+                },
+                "ask6": {
+                    "description": "卖6",
+                    "type": "number"
+                },
+                "ask7": {
+                    "description": "卖7",
+                    "type": "number"
+                },
+                "ask8": {
+                    "description": "卖8",
+                    "type": "number"
+                },
+                "ask9": {
+                    "description": "卖9",
+                    "type": "number"
+                },
+                "askorderid": {
+                    "description": "卖单号1",
+                    "type": "integer"
+                },
+                "askorderid2": {
+                    "description": "卖单号2",
+                    "type": "integer"
+                },
+                "askorderid3": {
+                    "description": "卖单号3",
+                    "type": "integer"
+                },
+                "askorderid4": {
+                    "description": "卖单号4",
+                    "type": "integer"
+                },
+                "askorderid5": {
+                    "description": "卖单号5",
+                    "type": "integer"
+                },
+                "askordervolume": {
+                    "description": "卖单量1",
+                    "type": "integer"
+                },
+                "askordervolume10": {
+                    "description": "卖单量10",
+                    "type": "integer"
+                },
+                "askordervolume2": {
+                    "description": "卖单量2",
+                    "type": "integer"
+                },
+                "askordervolume3": {
+                    "description": "卖单量3",
+                    "type": "integer"
+                },
+                "askordervolume4": {
+                    "description": "卖单量4",
+                    "type": "integer"
+                },
+                "askordervolume5": {
+                    "description": "卖单量5",
+                    "type": "integer"
+                },
+                "askordervolume6": {
+                    "description": "卖单量6",
+                    "type": "integer"
+                },
+                "askordervolume7": {
+                    "description": "卖单量7",
+                    "type": "integer"
+                },
+                "askordervolume8": {
+                    "description": "卖单量8",
+                    "type": "integer"
+                },
+                "askordervolume9": {
+                    "description": "卖单量9",
+                    "type": "integer"
+                },
+                "askqueueinfo": {
+                    "description": "大利市卖港股用",
+                    "type": "string"
+                },
+                "askvolume": {
+                    "description": "卖量1",
+                    "type": "integer"
+                },
+                "askvolume10": {
+                    "description": "卖量10",
+                    "type": "integer"
+                },
+                "askvolume2": {
+                    "description": "卖量2",
+                    "type": "integer"
+                },
+                "askvolume3": {
+                    "description": "卖量3",
+                    "type": "integer"
+                },
+                "askvolume4": {
+                    "description": "卖量4",
+                    "type": "integer"
+                },
+                "askvolume5": {
+                    "description": "卖量5",
+                    "type": "integer"
+                },
+                "askvolume6": {
+                    "description": "卖量6",
+                    "type": "integer"
+                },
+                "askvolume7": {
+                    "description": "卖量7",
+                    "type": "integer"
+                },
+                "askvolume8": {
+                    "description": "卖量8",
+                    "type": "integer"
+                },
+                "askvolume9": {
+                    "description": "卖量9",
+                    "type": "integer"
+                },
+                "averageprice": {
+                    "description": "均价",
+                    "type": "number"
+                },
+                "bid": {
+                    "description": "买1",
+                    "type": "number"
+                },
+                "bid10": {
+                    "description": "买10",
+                    "type": "number"
+                },
+                "bid2": {
+                    "description": "买2",
+                    "type": "number"
+                },
+                "bid3": {
+                    "description": "买3",
+                    "type": "number"
+                },
+                "bid4": {
+                    "description": "买4",
+                    "type": "number"
+                },
+                "bid5": {
+                    "description": "买5",
+                    "type": "number"
+                },
+                "bid6": {
+                    "description": "买6",
+                    "type": "number"
+                },
+                "bid7": {
+                    "description": "买7",
+                    "type": "number"
+                },
+                "bid8": {
+                    "description": "买8",
+                    "type": "number"
+                },
+                "bid9": {
+                    "description": "买9",
+                    "type": "number"
+                },
+                "bidorderid": {
+                    "description": "买单号1",
+                    "type": "integer"
+                },
+                "bidorderid2": {
+                    "description": "买单号2",
+                    "type": "integer"
+                },
+                "bidorderid3": {
+                    "description": "买单号3",
+                    "type": "integer"
+                },
+                "bidorderid4": {
+                    "description": "买单号4",
+                    "type": "integer"
+                },
+                "bidorderid5": {
+                    "description": "买单号5",
+                    "type": "integer"
+                },
+                "bidordervolume": {
+                    "description": "买单量1",
+                    "type": "integer"
+                },
+                "bidordervolume10": {
+                    "description": "买单量10",
+                    "type": "integer"
+                },
+                "bidordervolume2": {
+                    "description": "买单量2",
+                    "type": "integer"
+                },
+                "bidordervolume3": {
+                    "description": "买单量3",
+                    "type": "integer"
+                },
+                "bidordervolume4": {
+                    "description": "买单量4",
+                    "type": "integer"
+                },
+                "bidordervolume5": {
+                    "description": "买单量5",
+                    "type": "integer"
+                },
+                "bidordervolume6": {
+                    "description": "买单量6",
+                    "type": "integer"
+                },
+                "bidordervolume7": {
+                    "description": "买单量7",
+                    "type": "integer"
+                },
+                "bidordervolume8": {
+                    "description": "买单量8",
+                    "type": "integer"
+                },
+                "bidordervolume9": {
+                    "description": "买单量9",
+                    "type": "integer"
+                },
+                "bidqueueinfo": {
+                    "description": "大利市买港股用",
+                    "type": "string"
+                },
+                "bidvolume": {
+                    "description": "买量1",
+                    "type": "integer"
+                },
+                "bidvolume10": {
+                    "description": "买量10",
+                    "type": "integer"
+                },
+                "bidvolume2": {
+                    "description": "买量2",
+                    "type": "integer"
+                },
+                "bidvolume3": {
+                    "description": "买量3",
+                    "type": "integer"
+                },
+                "bidvolume4": {
+                    "description": "买量4",
+                    "type": "integer"
+                },
+                "bidvolume5": {
+                    "description": "买量5",
+                    "type": "integer"
+                },
+                "bidvolume6": {
+                    "description": "买量6",
+                    "type": "integer"
+                },
+                "bidvolume7": {
+                    "description": "买量7",
+                    "type": "integer"
+                },
+                "bidvolume8": {
+                    "description": "买量8",
+                    "type": "integer"
+                },
+                "bidvolume9": {
+                    "description": "买量9",
+                    "type": "integer"
+                },
+                "calloptionpremiums": {
+                    "description": "认购期权1",
+                    "type": "integer"
+                },
+                "calloptionpremiums2": {
+                    "description": "认购期权2",
+                    "type": "integer"
+                },
+                "calloptionpremiums3": {
+                    "description": "认购期权3",
+                    "type": "integer"
+                },
+                "calloptionpremiums4": {
+                    "description": "认购期权4",
+                    "type": "integer"
+                },
+                "calloptionpremiums5": {
+                    "description": "认购期权5",
+                    "type": "integer"
+                },
+                "cleartime": {
+                    "description": "清盘时间",
+                    "type": "integer"
+                },
+                "exchangecode": {
+                    "description": "交易所代码",
+                    "type": "integer"
+                },
+                "exchangedate": {
+                    "description": "交易日",
+                    "type": "integer"
+                },
+                "goodscode": {
+                    "description": "商品代码",
+                    "type": "string"
+                },
+                "grepmarketprice": {
+                    "description": "暗盘价 港股专用",
+                    "type": "number"
+                },
+                "highest": {
+                    "description": "最高价",
+                    "type": "number"
+                },
+                "holdincrement": {
+                    "description": "单笔持仓",
+                    "type": "integer"
+                },
+                "holdvolume": {
+                    "description": "持仓",
+                    "type": "integer"
+                },
+                "iep": {
+                    "description": "平衡价 港股专用",
+                    "type": "number"
+                },
+                "iev": {
+                    "description": "平衡量 港股专用",
+                    "type": "number"
+                },
+                "inventory": {
+                    "description": "库存",
+                    "type": "integer"
+                },
+                "iscleared": {
+                    "description": "是否清盘标志",
+                    "type": "integer"
+                },
+                "issettled": {
+                    "description": "是否结算标志",
+                    "type": "integer"
+                },
+                "last": {
+                    "description": "最新价",
+                    "type": "number"
+                },
+                "lastlot": {
+                    "description": "最新成交手数",
+                    "type": "integer"
+                },
+                "lasttime": {
+                    "description": "行情时间(只有现价变化行情时间才变化)",
+                    "type": "string"
+                },
+                "lastturnover": {
+                    "description": "最新成交金额",
+                    "type": "number"
+                },
+                "lastvolume": {
+                    "description": "最新成交量",
+                    "type": "integer"
+                },
+                "limitdown": {
+                    "description": "跌停价",
+                    "type": "number"
+                },
+                "limitup": {
+                    "description": "涨停价",
+                    "type": "number"
+                },
+                "lowest": {
+                    "description": "最低价",
+                    "type": "number"
+                },
+                "nontotalholdervolume": {
+                    "description": "非交易持仓量",
+                    "type": "integer"
+                },
+                "nontotallot": {
+                    "description": "非交易总手数",
+                    "type": "integer"
+                },
+                "nontotalturnover": {
+                    "description": "非交易总金额",
+                    "type": "integer"
+                },
+                "nontotalvolume": {
+                    "description": "非交易总量",
+                    "type": "integer"
+                },
+                "opened": {
+                    "description": "开盘价",
+                    "type": "number"
+                },
+                "opentime": {
+                    "description": "开盘时间",
+                    "type": "string"
+                },
+                "orderid": {
+                    "description": "序号",
+                    "type": "integer"
+                },
+                "preclose": {
+                    "description": "昨收",
+                    "type": "number"
+                },
+                "preholdvolume": {
+                    "description": "昨持仓",
+                    "type": "integer"
+                },
+                "presettle": {
+                    "description": "昨结价",
+                    "type": "number"
+                },
+                "publictradetype": {
+                    "description": "公共交易标志类型 港股专用",
+                    "type": "string"
+                },
+                "putoptionpremiums": {
+                    "description": "认沽期权1",
+                    "type": "integer"
+                },
+                "putoptionpremiums2": {
+                    "description": "认沽期权2",
+                    "type": "integer"
+                },
+                "putoptionpremiums3": {
+                    "description": "认沽期权3",
+                    "type": "integer"
+                },
+                "putoptionpremiums4": {
+                    "description": "认沽期权4",
+                    "type": "integer"
+                },
+                "putoptionpremiums5": {
+                    "description": "认沽期权5",
+                    "type": "integer"
+                },
+                "settle": {
+                    "description": "结算价",
+                    "type": "number"
+                },
+                "strikeprice": {
+                    "description": "发行价",
+                    "type": "number"
+                },
+                "totalaskvolume": {
+                    "description": "内盘",
+                    "type": "integer"
+                },
+                "totalbidvolume": {
+                    "description": "外盘",
+                    "type": "integer"
+                },
+                "totallot": {
+                    "description": "总手数",
+                    "type": "integer"
+                },
+                "totalturnover": {
+                    "description": "总金额",
+                    "type": "number"
+                },
+                "totalvolume": {
+                    "description": "总量",
+                    "type": "integer"
+                },
+                "utclasttime": {
+                    "description": "utc的行情时间",
+                    "type": "string"
+                }
+            }
+        },
         "quote.QueryTSDataRsp": {
             "type": "object",
             "properties": {

+ 536 - 0
docs/swagger.json

@@ -4864,6 +4864,45 @@
                 }
             }
         },
+        "/Quote/QueryQuoteDay": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "行情服务"
+                ],
+                "summary": "获取商品盘面信息",
+                "parameters": [
+                    {
+                        "type": "string",
+                        "description": "商品代码列表,格式:CU2102,CU2103,AL2107",
+                        "name": "goodsCodes",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/quote.QueryQuoteDayRsp"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Quote/QueryTSData": {
             "get": {
                 "produces": [
@@ -16361,6 +16400,503 @@
                 }
             }
         },
+        "quote.QueryQuoteDayRsp": {
+            "type": "object",
+            "properties": {
+                "ask": {
+                    "description": "卖1",
+                    "type": "number"
+                },
+                "ask10": {
+                    "description": "卖10",
+                    "type": "number"
+                },
+                "ask2": {
+                    "description": "卖2",
+                    "type": "number"
+                },
+                "ask3": {
+                    "description": "卖3",
+                    "type": "number"
+                },
+                "ask4": {
+                    "description": "卖4",
+                    "type": "number"
+                },
+                "ask5": {
+                    "description": "卖5",
+                    "type": "number"
+                },
+                "ask6": {
+                    "description": "卖6",
+                    "type": "number"
+                },
+                "ask7": {
+                    "description": "卖7",
+                    "type": "number"
+                },
+                "ask8": {
+                    "description": "卖8",
+                    "type": "number"
+                },
+                "ask9": {
+                    "description": "卖9",
+                    "type": "number"
+                },
+                "askorderid": {
+                    "description": "卖单号1",
+                    "type": "integer"
+                },
+                "askorderid2": {
+                    "description": "卖单号2",
+                    "type": "integer"
+                },
+                "askorderid3": {
+                    "description": "卖单号3",
+                    "type": "integer"
+                },
+                "askorderid4": {
+                    "description": "卖单号4",
+                    "type": "integer"
+                },
+                "askorderid5": {
+                    "description": "卖单号5",
+                    "type": "integer"
+                },
+                "askordervolume": {
+                    "description": "卖单量1",
+                    "type": "integer"
+                },
+                "askordervolume10": {
+                    "description": "卖单量10",
+                    "type": "integer"
+                },
+                "askordervolume2": {
+                    "description": "卖单量2",
+                    "type": "integer"
+                },
+                "askordervolume3": {
+                    "description": "卖单量3",
+                    "type": "integer"
+                },
+                "askordervolume4": {
+                    "description": "卖单量4",
+                    "type": "integer"
+                },
+                "askordervolume5": {
+                    "description": "卖单量5",
+                    "type": "integer"
+                },
+                "askordervolume6": {
+                    "description": "卖单量6",
+                    "type": "integer"
+                },
+                "askordervolume7": {
+                    "description": "卖单量7",
+                    "type": "integer"
+                },
+                "askordervolume8": {
+                    "description": "卖单量8",
+                    "type": "integer"
+                },
+                "askordervolume9": {
+                    "description": "卖单量9",
+                    "type": "integer"
+                },
+                "askqueueinfo": {
+                    "description": "大利市卖港股用",
+                    "type": "string"
+                },
+                "askvolume": {
+                    "description": "卖量1",
+                    "type": "integer"
+                },
+                "askvolume10": {
+                    "description": "卖量10",
+                    "type": "integer"
+                },
+                "askvolume2": {
+                    "description": "卖量2",
+                    "type": "integer"
+                },
+                "askvolume3": {
+                    "description": "卖量3",
+                    "type": "integer"
+                },
+                "askvolume4": {
+                    "description": "卖量4",
+                    "type": "integer"
+                },
+                "askvolume5": {
+                    "description": "卖量5",
+                    "type": "integer"
+                },
+                "askvolume6": {
+                    "description": "卖量6",
+                    "type": "integer"
+                },
+                "askvolume7": {
+                    "description": "卖量7",
+                    "type": "integer"
+                },
+                "askvolume8": {
+                    "description": "卖量8",
+                    "type": "integer"
+                },
+                "askvolume9": {
+                    "description": "卖量9",
+                    "type": "integer"
+                },
+                "averageprice": {
+                    "description": "均价",
+                    "type": "number"
+                },
+                "bid": {
+                    "description": "买1",
+                    "type": "number"
+                },
+                "bid10": {
+                    "description": "买10",
+                    "type": "number"
+                },
+                "bid2": {
+                    "description": "买2",
+                    "type": "number"
+                },
+                "bid3": {
+                    "description": "买3",
+                    "type": "number"
+                },
+                "bid4": {
+                    "description": "买4",
+                    "type": "number"
+                },
+                "bid5": {
+                    "description": "买5",
+                    "type": "number"
+                },
+                "bid6": {
+                    "description": "买6",
+                    "type": "number"
+                },
+                "bid7": {
+                    "description": "买7",
+                    "type": "number"
+                },
+                "bid8": {
+                    "description": "买8",
+                    "type": "number"
+                },
+                "bid9": {
+                    "description": "买9",
+                    "type": "number"
+                },
+                "bidorderid": {
+                    "description": "买单号1",
+                    "type": "integer"
+                },
+                "bidorderid2": {
+                    "description": "买单号2",
+                    "type": "integer"
+                },
+                "bidorderid3": {
+                    "description": "买单号3",
+                    "type": "integer"
+                },
+                "bidorderid4": {
+                    "description": "买单号4",
+                    "type": "integer"
+                },
+                "bidorderid5": {
+                    "description": "买单号5",
+                    "type": "integer"
+                },
+                "bidordervolume": {
+                    "description": "买单量1",
+                    "type": "integer"
+                },
+                "bidordervolume10": {
+                    "description": "买单量10",
+                    "type": "integer"
+                },
+                "bidordervolume2": {
+                    "description": "买单量2",
+                    "type": "integer"
+                },
+                "bidordervolume3": {
+                    "description": "买单量3",
+                    "type": "integer"
+                },
+                "bidordervolume4": {
+                    "description": "买单量4",
+                    "type": "integer"
+                },
+                "bidordervolume5": {
+                    "description": "买单量5",
+                    "type": "integer"
+                },
+                "bidordervolume6": {
+                    "description": "买单量6",
+                    "type": "integer"
+                },
+                "bidordervolume7": {
+                    "description": "买单量7",
+                    "type": "integer"
+                },
+                "bidordervolume8": {
+                    "description": "买单量8",
+                    "type": "integer"
+                },
+                "bidordervolume9": {
+                    "description": "买单量9",
+                    "type": "integer"
+                },
+                "bidqueueinfo": {
+                    "description": "大利市买港股用",
+                    "type": "string"
+                },
+                "bidvolume": {
+                    "description": "买量1",
+                    "type": "integer"
+                },
+                "bidvolume10": {
+                    "description": "买量10",
+                    "type": "integer"
+                },
+                "bidvolume2": {
+                    "description": "买量2",
+                    "type": "integer"
+                },
+                "bidvolume3": {
+                    "description": "买量3",
+                    "type": "integer"
+                },
+                "bidvolume4": {
+                    "description": "买量4",
+                    "type": "integer"
+                },
+                "bidvolume5": {
+                    "description": "买量5",
+                    "type": "integer"
+                },
+                "bidvolume6": {
+                    "description": "买量6",
+                    "type": "integer"
+                },
+                "bidvolume7": {
+                    "description": "买量7",
+                    "type": "integer"
+                },
+                "bidvolume8": {
+                    "description": "买量8",
+                    "type": "integer"
+                },
+                "bidvolume9": {
+                    "description": "买量9",
+                    "type": "integer"
+                },
+                "calloptionpremiums": {
+                    "description": "认购期权1",
+                    "type": "integer"
+                },
+                "calloptionpremiums2": {
+                    "description": "认购期权2",
+                    "type": "integer"
+                },
+                "calloptionpremiums3": {
+                    "description": "认购期权3",
+                    "type": "integer"
+                },
+                "calloptionpremiums4": {
+                    "description": "认购期权4",
+                    "type": "integer"
+                },
+                "calloptionpremiums5": {
+                    "description": "认购期权5",
+                    "type": "integer"
+                },
+                "cleartime": {
+                    "description": "清盘时间",
+                    "type": "integer"
+                },
+                "exchangecode": {
+                    "description": "交易所代码",
+                    "type": "integer"
+                },
+                "exchangedate": {
+                    "description": "交易日",
+                    "type": "integer"
+                },
+                "goodscode": {
+                    "description": "商品代码",
+                    "type": "string"
+                },
+                "grepmarketprice": {
+                    "description": "暗盘价 港股专用",
+                    "type": "number"
+                },
+                "highest": {
+                    "description": "最高价",
+                    "type": "number"
+                },
+                "holdincrement": {
+                    "description": "单笔持仓",
+                    "type": "integer"
+                },
+                "holdvolume": {
+                    "description": "持仓",
+                    "type": "integer"
+                },
+                "iep": {
+                    "description": "平衡价 港股专用",
+                    "type": "number"
+                },
+                "iev": {
+                    "description": "平衡量 港股专用",
+                    "type": "number"
+                },
+                "inventory": {
+                    "description": "库存",
+                    "type": "integer"
+                },
+                "iscleared": {
+                    "description": "是否清盘标志",
+                    "type": "integer"
+                },
+                "issettled": {
+                    "description": "是否结算标志",
+                    "type": "integer"
+                },
+                "last": {
+                    "description": "最新价",
+                    "type": "number"
+                },
+                "lastlot": {
+                    "description": "最新成交手数",
+                    "type": "integer"
+                },
+                "lasttime": {
+                    "description": "行情时间(只有现价变化行情时间才变化)",
+                    "type": "string"
+                },
+                "lastturnover": {
+                    "description": "最新成交金额",
+                    "type": "number"
+                },
+                "lastvolume": {
+                    "description": "最新成交量",
+                    "type": "integer"
+                },
+                "limitdown": {
+                    "description": "跌停价",
+                    "type": "number"
+                },
+                "limitup": {
+                    "description": "涨停价",
+                    "type": "number"
+                },
+                "lowest": {
+                    "description": "最低价",
+                    "type": "number"
+                },
+                "nontotalholdervolume": {
+                    "description": "非交易持仓量",
+                    "type": "integer"
+                },
+                "nontotallot": {
+                    "description": "非交易总手数",
+                    "type": "integer"
+                },
+                "nontotalturnover": {
+                    "description": "非交易总金额",
+                    "type": "integer"
+                },
+                "nontotalvolume": {
+                    "description": "非交易总量",
+                    "type": "integer"
+                },
+                "opened": {
+                    "description": "开盘价",
+                    "type": "number"
+                },
+                "opentime": {
+                    "description": "开盘时间",
+                    "type": "string"
+                },
+                "orderid": {
+                    "description": "序号",
+                    "type": "integer"
+                },
+                "preclose": {
+                    "description": "昨收",
+                    "type": "number"
+                },
+                "preholdvolume": {
+                    "description": "昨持仓",
+                    "type": "integer"
+                },
+                "presettle": {
+                    "description": "昨结价",
+                    "type": "number"
+                },
+                "publictradetype": {
+                    "description": "公共交易标志类型 港股专用",
+                    "type": "string"
+                },
+                "putoptionpremiums": {
+                    "description": "认沽期权1",
+                    "type": "integer"
+                },
+                "putoptionpremiums2": {
+                    "description": "认沽期权2",
+                    "type": "integer"
+                },
+                "putoptionpremiums3": {
+                    "description": "认沽期权3",
+                    "type": "integer"
+                },
+                "putoptionpremiums4": {
+                    "description": "认沽期权4",
+                    "type": "integer"
+                },
+                "putoptionpremiums5": {
+                    "description": "认沽期权5",
+                    "type": "integer"
+                },
+                "settle": {
+                    "description": "结算价",
+                    "type": "number"
+                },
+                "strikeprice": {
+                    "description": "发行价",
+                    "type": "number"
+                },
+                "totalaskvolume": {
+                    "description": "内盘",
+                    "type": "integer"
+                },
+                "totalbidvolume": {
+                    "description": "外盘",
+                    "type": "integer"
+                },
+                "totallot": {
+                    "description": "总手数",
+                    "type": "integer"
+                },
+                "totalturnover": {
+                    "description": "总金额",
+                    "type": "number"
+                },
+                "totalvolume": {
+                    "description": "总量",
+                    "type": "integer"
+                },
+                "utclasttime": {
+                    "description": "utc的行情时间",
+                    "type": "string"
+                }
+            }
+        },
         "quote.QueryTSDataRsp": {
             "type": "object",
             "properties": {

+ 396 - 0
docs/swagger.yaml

@@ -7771,6 +7771,378 @@ definitions:
         description: 总量
         type: integer
     type: object
+  quote.QueryQuoteDayRsp:
+    properties:
+      ask:
+        description: 卖1
+        type: number
+      ask2:
+        description: 卖2
+        type: number
+      ask3:
+        description: 卖3
+        type: number
+      ask4:
+        description: 卖4
+        type: number
+      ask5:
+        description: 卖5
+        type: number
+      ask6:
+        description: 卖6
+        type: number
+      ask7:
+        description: 卖7
+        type: number
+      ask8:
+        description: 卖8
+        type: number
+      ask9:
+        description: 卖9
+        type: number
+      ask10:
+        description: 卖10
+        type: number
+      askorderid:
+        description: 卖单号1
+        type: integer
+      askorderid2:
+        description: 卖单号2
+        type: integer
+      askorderid3:
+        description: 卖单号3
+        type: integer
+      askorderid4:
+        description: 卖单号4
+        type: integer
+      askorderid5:
+        description: 卖单号5
+        type: integer
+      askordervolume:
+        description: 卖单量1
+        type: integer
+      askordervolume2:
+        description: 卖单量2
+        type: integer
+      askordervolume3:
+        description: 卖单量3
+        type: integer
+      askordervolume4:
+        description: 卖单量4
+        type: integer
+      askordervolume5:
+        description: 卖单量5
+        type: integer
+      askordervolume6:
+        description: 卖单量6
+        type: integer
+      askordervolume7:
+        description: 卖单量7
+        type: integer
+      askordervolume8:
+        description: 卖单量8
+        type: integer
+      askordervolume9:
+        description: 卖单量9
+        type: integer
+      askordervolume10:
+        description: 卖单量10
+        type: integer
+      askqueueinfo:
+        description: 大利市卖港股用
+        type: string
+      askvolume:
+        description: 卖量1
+        type: integer
+      askvolume2:
+        description: 卖量2
+        type: integer
+      askvolume3:
+        description: 卖量3
+        type: integer
+      askvolume4:
+        description: 卖量4
+        type: integer
+      askvolume5:
+        description: 卖量5
+        type: integer
+      askvolume6:
+        description: 卖量6
+        type: integer
+      askvolume7:
+        description: 卖量7
+        type: integer
+      askvolume8:
+        description: 卖量8
+        type: integer
+      askvolume9:
+        description: 卖量9
+        type: integer
+      askvolume10:
+        description: 卖量10
+        type: integer
+      averageprice:
+        description: 均价
+        type: number
+      bid:
+        description: 买1
+        type: number
+      bid2:
+        description: 买2
+        type: number
+      bid3:
+        description: 买3
+        type: number
+      bid4:
+        description: 买4
+        type: number
+      bid5:
+        description: 买5
+        type: number
+      bid6:
+        description: 买6
+        type: number
+      bid7:
+        description: 买7
+        type: number
+      bid8:
+        description: 买8
+        type: number
+      bid9:
+        description: 买9
+        type: number
+      bid10:
+        description: 买10
+        type: number
+      bidorderid:
+        description: 买单号1
+        type: integer
+      bidorderid2:
+        description: 买单号2
+        type: integer
+      bidorderid3:
+        description: 买单号3
+        type: integer
+      bidorderid4:
+        description: 买单号4
+        type: integer
+      bidorderid5:
+        description: 买单号5
+        type: integer
+      bidordervolume:
+        description: 买单量1
+        type: integer
+      bidordervolume2:
+        description: 买单量2
+        type: integer
+      bidordervolume3:
+        description: 买单量3
+        type: integer
+      bidordervolume4:
+        description: 买单量4
+        type: integer
+      bidordervolume5:
+        description: 买单量5
+        type: integer
+      bidordervolume6:
+        description: 买单量6
+        type: integer
+      bidordervolume7:
+        description: 买单量7
+        type: integer
+      bidordervolume8:
+        description: 买单量8
+        type: integer
+      bidordervolume9:
+        description: 买单量9
+        type: integer
+      bidordervolume10:
+        description: 买单量10
+        type: integer
+      bidqueueinfo:
+        description: 大利市买港股用
+        type: string
+      bidvolume:
+        description: 买量1
+        type: integer
+      bidvolume2:
+        description: 买量2
+        type: integer
+      bidvolume3:
+        description: 买量3
+        type: integer
+      bidvolume4:
+        description: 买量4
+        type: integer
+      bidvolume5:
+        description: 买量5
+        type: integer
+      bidvolume6:
+        description: 买量6
+        type: integer
+      bidvolume7:
+        description: 买量7
+        type: integer
+      bidvolume8:
+        description: 买量8
+        type: integer
+      bidvolume9:
+        description: 买量9
+        type: integer
+      bidvolume10:
+        description: 买量10
+        type: integer
+      calloptionpremiums:
+        description: 认购期权1
+        type: integer
+      calloptionpremiums2:
+        description: 认购期权2
+        type: integer
+      calloptionpremiums3:
+        description: 认购期权3
+        type: integer
+      calloptionpremiums4:
+        description: 认购期权4
+        type: integer
+      calloptionpremiums5:
+        description: 认购期权5
+        type: integer
+      cleartime:
+        description: 清盘时间
+        type: integer
+      exchangecode:
+        description: 交易所代码
+        type: integer
+      exchangedate:
+        description: 交易日
+        type: integer
+      goodscode:
+        description: 商品代码
+        type: string
+      grepmarketprice:
+        description: 暗盘价 港股专用
+        type: number
+      highest:
+        description: 最高价
+        type: number
+      holdincrement:
+        description: 单笔持仓
+        type: integer
+      holdvolume:
+        description: 持仓
+        type: integer
+      iep:
+        description: 平衡价 港股专用
+        type: number
+      iev:
+        description: 平衡量 港股专用
+        type: number
+      inventory:
+        description: 库存
+        type: integer
+      iscleared:
+        description: 是否清盘标志
+        type: integer
+      issettled:
+        description: 是否结算标志
+        type: integer
+      last:
+        description: 最新价
+        type: number
+      lastlot:
+        description: 最新成交手数
+        type: integer
+      lasttime:
+        description: 行情时间(只有现价变化行情时间才变化)
+        type: string
+      lastturnover:
+        description: 最新成交金额
+        type: number
+      lastvolume:
+        description: 最新成交量
+        type: integer
+      limitdown:
+        description: 跌停价
+        type: number
+      limitup:
+        description: 涨停价
+        type: number
+      lowest:
+        description: 最低价
+        type: number
+      nontotalholdervolume:
+        description: 非交易持仓量
+        type: integer
+      nontotallot:
+        description: 非交易总手数
+        type: integer
+      nontotalturnover:
+        description: 非交易总金额
+        type: integer
+      nontotalvolume:
+        description: 非交易总量
+        type: integer
+      opened:
+        description: 开盘价
+        type: number
+      opentime:
+        description: 开盘时间
+        type: string
+      orderid:
+        description: 序号
+        type: integer
+      preclose:
+        description: 昨收
+        type: number
+      preholdvolume:
+        description: 昨持仓
+        type: integer
+      presettle:
+        description: 昨结价
+        type: number
+      publictradetype:
+        description: 公共交易标志类型 港股专用
+        type: string
+      putoptionpremiums:
+        description: 认沽期权1
+        type: integer
+      putoptionpremiums2:
+        description: 认沽期权2
+        type: integer
+      putoptionpremiums3:
+        description: 认沽期权3
+        type: integer
+      putoptionpremiums4:
+        description: 认沽期权4
+        type: integer
+      putoptionpremiums5:
+        description: 认沽期权5
+        type: integer
+      settle:
+        description: 结算价
+        type: number
+      strikeprice:
+        description: 发行价
+        type: number
+      totalaskvolume:
+        description: 内盘
+        type: integer
+      totalbidvolume:
+        description: 外盘
+        type: integer
+      totallot:
+        description: 总手数
+        type: integer
+      totalturnover:
+        description: 总金额
+        type: number
+      totalvolume:
+        description: 总量
+        type: integer
+      utclasttime:
+        description: utc的行情时间
+        type: string
+    type: object
   quote.QueryTSDataRsp:
     properties:
       decimalPlace:
@@ -11379,6 +11751,30 @@ paths:
       summary: 查询行情历史数据
       tags:
       - 行情服务
+  /Quote/QueryQuoteDay:
+    get:
+      parameters:
+      - description: 商品代码列表,格式:CU2102,CU2103,AL2107
+        in: query
+        name: goodsCodes
+        required: true
+        type: string
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            $ref: '#/definitions/quote.QueryQuoteDayRsp'
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 获取商品盘面信息
+      tags:
+      - 行情服务
   /Quote/QueryTSData:
     get:
       parameters:

+ 120 - 17
models/ermcpOrder.go

@@ -9,23 +9,26 @@ import (
 
 // Hedgeouttradeposition 对冲外部持仓头寸表 - 导历史
 type Hedgeouttradeposition struct {
-	Accountid         int64  `json:"accountid"  xorm:"'ACCOUNTID'" binding:"required"`       // 资金账号[外部母账户]
-	Hedgegoodsid      int64  `json:"hedgegoodsid"  xorm:"'HEDGEGOODSID'" binding:"required"` // 对冲合约ID
-	Hedgeaccountcode  string `json:"hedgeaccountcode"  xorm:"'HEDGEACCOUNTCODE'"`            // 对冲账号
-	Tradedate         string `json:"tradedate"  xorm:"'TRADEDATE'"`                          // 交易日(yyyyMMdd)
-	Marketid          int32  `json:"marketid"  xorm:"'MARKETID'"`                            // 市场ID
-	Ydbuyposition     int64  `json:"ydbuyposition"  xorm:"'YDBUYPOSITION'"`                  // 期初买头寸
-	Curbuyposition    int64  `json:"curbuyposition"  xorm:"'CURBUYPOSITION'"`                // 期末买头寸
-	Curydbuyposition  int64  `json:"curydbuyposition"  xorm:"'CURYDBUYPOSITION'"`            // 期末上日买头寸
-	Curtdbuyposition  int64  `json:"curtdbuyposition"  xorm:"'CURTDBUYPOSITION'"`            // 期末今日买头寸
-	Freydbuyposition  int64  `json:"freydbuyposition"  xorm:"'FREYDBUYPOSITION'"`            // 冻结上日买头寸
-	Fretdbuyposition  int64  `json:"fretdbuyposition"  xorm:"'FRETDBUYPOSITION'"`            // 冻结今日买头寸
-	Ydsellposition    int64  `json:"ydsellposition"  xorm:"'YDSELLPOSITION'"`                // 期初卖头寸
-	Cursellposition   int64  `json:"cursellposition"  xorm:"'CURSELLPOSITION'"`              // 期末卖头寸
-	Curydsellposition int64  `json:"curydsellposition"  xorm:"'CURYDSELLPOSITION'"`          // 期末上日卖头寸
-	Curtdsellposition int64  `json:"curtdsellposition"  xorm:"'CURTDSELLPOSITION'"`          // 期末今日卖头寸
-	Freydsellposition int64  `json:"freydsellposition"  xorm:"'FREYDSELLPOSITION'"`          // 冻结上日卖头寸
-	Fretdsellposition int64  `json:"fretdsellposition"  xorm:"'FRETDSELLPOSITION'"`          // 冻结今日卖头寸
+	Accountid         int64   `json:"accountid"  xorm:"'ACCOUNTID'" binding:"required"`       // 资金账号[外部母账户]
+	Hedgegoodsid      int64   `json:"hedgegoodsid"  xorm:"'HEDGEGOODSID'" binding:"required"` // 对冲合约ID
+	Hedgeaccountcode  string  `json:"hedgeaccountcode"  xorm:"'HEDGEACCOUNTCODE'"`            // 对冲账号
+	Tradedate         string  `json:"tradedate"  xorm:"'TRADEDATE'"`                          // 交易日(yyyyMMdd)
+	Marketid          int32   `json:"marketid"  xorm:"'MARKETID'"`                            // 市场ID
+	Ydbuyposition     int64   `json:"ydbuyposition"  xorm:"'YDBUYPOSITION'"`                  // 期初买头寸
+	Curbuyposition    int64   `json:"curbuyposition"  xorm:"'CURBUYPOSITION'"`                // 期末买头寸
+	Curydbuyposition  int64   `json:"curydbuyposition"  xorm:"'CURYDBUYPOSITION'"`            // 期末上日买头寸
+	Curtdbuyposition  int64   `json:"curtdbuyposition"  xorm:"'CURTDBUYPOSITION'"`            // 期末今日买头寸
+	Freydbuyposition  int64   `json:"freydbuyposition"  xorm:"'FREYDBUYPOSITION'"`            // 冻结上日买头寸
+	Fretdbuyposition  int64   `json:"fretdbuyposition"  xorm:"'FRETDBUYPOSITION'"`            // 冻结今日买头寸
+	Ydsellposition    int64   `json:"ydsellposition"  xorm:"'YDSELLPOSITION'"`                // 期初卖头寸
+	Cursellposition   int64   `json:"cursellposition"  xorm:"'CURSELLPOSITION'"`              // 期末卖头寸
+	Curydsellposition int64   `json:"curydsellposition"  xorm:"'CURYDSELLPOSITION'"`          // 期末上日卖头寸
+	Curtdsellposition int64   `json:"curtdsellposition"  xorm:"'CURTDSELLPOSITION'"`          // 期末今日卖头寸
+	Freydsellposition int64   `json:"freydsellposition"  xorm:"'FREYDSELLPOSITION'"`          // 冻结上日卖头寸
+	Fretdsellposition int64   `json:"fretdsellposition"  xorm:"'FRETDSELLPOSITION'"`          // 冻结今日卖头寸
+	Opencost          float64 `json:"opencost"  xorm:"'OPENCOST'"`                            // 开仓成本
+	Positioncost      float64 `json:"positioncost"  xorm:"'POSITIONCOST'"`                    // 持仓成本
+	Usemargin         float64 `json:"usemargin"  xorm:"'USEMARGIN'"`                          // 占用保证金
 }
 
 // TableName is HEDGE_OUTTRADEPOSITION
@@ -33,6 +36,106 @@ func (Hedgeouttradeposition) TableName() string {
 	return "HEDGE_OUTTRADEPOSITION"
 }
 
+// Hedgeoutorderdetail 对冲外部委托单表 - 导历史
+type Hedgeoutorderdetail struct {
+	Outorderid            int64     `json:"outorderid"  xorm:"'OUTORDERID'" binding:"required"`             // 外部委托单ID(113+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	Hedgeaccountcode      string    `json:"hedgeaccountcode"  xorm:"'HEDGEACCOUNTCODE'" binding:"required"` // 对冲账号
+	Tradedate             string    `json:"tradedate"  xorm:"'TRADEDATE'"`                                  // 交易日(yyyyMMdd)
+	Accountid             int64     `json:"accountid"  xorm:"'ACCOUNTID'"`                                  // 资金账号[外部母账户]
+	Relatedorderid        int64     `json:"relatedorderid"  xorm:"'RELATEDORDERID'"`                        // 关联内部委托单号
+	Marketid              int32     `json:"marketid"  xorm:"'MARKETID'"`                                    // 市场ID
+	Hedgegoodsid          int64     `json:"hedgegoodsid"  xorm:"'HEDGEGOODSID'"`                            // 对冲合约ID
+	Orderpricetype        int32     `json:"orderpricetype"  xorm:"'ORDERPRICETYPE'"`                        // 报单价格条件 - 1:市价 2: 限价
+	Buyorsell             int32     `json:"buyorsell"  xorm:"'BUYORSELL'"`                                  // 买卖方向 - 0:买 1:卖
+	Channelbuildtype      int32     `json:"channelbuildtype"  xorm:"'CHANNELBUILDTYPE'"`                    // 开平标志- 0:无 1:建仓 2:平仓
+	Closetype             int32     `json:"closetype"  xorm:"'CLOSETYPE'"`                                  // 平仓方式 - 0:无 1:平今 2:平昨
+	Orderprice            float64   `json:"orderprice"  xorm:"'ORDERPRICE'"`                                // 委托价格
+	Orderqty              int64     `json:"orderqty"  xorm:"'ORDERQTY'"`                                    // 委托数量
+	Tradeqty              int64     `json:"tradeqty"  xorm:"'TRADEQTY'"`                                    // 成交数量
+	Cancelqty             int64     `json:"cancelqty"  xorm:"'CANCELQTY'"`                                  // 撤销数量
+	Validtype             int32     `json:"validtype"  xorm:"'VALIDTYPE'"`                                  // 有效期类型 - 1::当日有效
+	Hedgeflag             int32     `json:"hedgeflag"  xorm:"'HEDGEFLAG'"`                                  // 投机套保标志 - 0:无 1:投机 2:套保 3:套利
+	Channeloutorderstatus int32     `json:"channeloutorderstatus"  xorm:"'CHANNELOUTORDERSTATUS'"`          // 外部单据状态 - 1 - 接收报文 2 - 发送报文成功 3 - 委托成功 4 - 委托失败 5 - 全部成交 6 - 部成部撤 7 - 全部撤单
+	Ordertime             time.Time `json:"ordertime"  xorm:"'ORDERTIME'"`                                  // 委托时间
+	Updatetime            time.Time `json:"updatetime"  xorm:"'UPDATETIME'"`                                // 更新时间
+	Mhpinnerorderid       int64     `json:"mhpinnerorderid"  xorm:"'MHPINNERORDERID'"`                      // 接口平台委托单ID
+	Mhprspcode            int64     `json:"mhprspcode"  xorm:"'MHPRSPCODE'"`                                // 渠道返回码
+	Mhprsptext            string    `json:"mhprsptext"  xorm:"'MHPRSPTEXT'"`                                // 渠道返回信息
+	Optiontype            int32     `json:"optiontype"  xorm:"'OPTIONTYPE'"`                                // 期权类型 - 1:认购(看涨) 2:认沽(看跌)
+	Premium               float64   `json:"premium"  xorm:"'PREMIUM'"`                                      // 权利金
+	Realoutorderid        int64     `json:"realoutorderid"  xorm:"'REALOUTORDERID'"`                        // 实际外部平台委托单ID
+	Relatedcreateorderid  int64     `json:"relatedcreateorderid"  xorm:"'RELATEDCREATEORDERID'"`            // 关联外部建仓委托单ID[平仓委托]
+	Channeloperatetype    int32     `json:"channeloperatetype"  xorm:"'CHANNELOPERATETYPE'"`                // 操作类型 - 1:正常委托 2:斩仓委托 3:强平委托
+	Channelordersrc       int32     `json:"channelordersrc"  xorm:"'CHANNELORDERSRC'"`                      // 委托来源 -  1:客户端 2:风控服务 3:管理端 4:下单接口平台 5:交易服务 6:跟单服务 7:监控终端
+	Operatorid            int64     `json:"operatorid"  xorm:"'OPERATORID'"`                                // 登录账号(LoginID)
+	Clientordertime       time.Time `json:"clientordertime"  xorm:"'CLIENTORDERTIME'"`                      // 客户端委托时间
+	Clientticket          string    `json:"clientticket"  xorm:"'CLIENTTICKET'"`                            // 客户端流水号
+	UUID                  string    `json:"uuid"  xorm:"'UUID'"`                                            // 发起端唯一id
+	Clienttype            int32     `json:"clienttype"  xorm:"'CLIENTTYPE'"`                                // 客户端类型 - 0:保留为未填终端类型 1:PC管理端 2:PC交易端 3:手机客户端_安卓 4:网页客户端 5:微信客户端 6:手机客户端_苹果 7:网上开户客户端 8:无效终端编号 9:报价终端(中江) 10;监控终端
+	Sessionid             int64     `json:"sessionid"  xorm:"'SESSIONID'"`                                  // 会话ID
+}
+
+// TableName is HEDGE_OUTORDERDETAIL
+func (Hedgeoutorderdetail) TableName() string {
+	return "HEDGE_OUTORDERDETAIL"
+}
+
+// Hedgeouttradedetail 对冲外部成交单表 - 导历史
+type Hedgeouttradedetail struct {
+	Outtradeid             int64     `json:"outtradeid"  xorm:"'OUTTRADEID'" binding:"required"`      // 外部成交单ID(114+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	Tradedate              string    `json:"tradedate"  xorm:"'TRADEDATE'"`                           // 交易日(yyyyMMdd)
+	Relatedoutorderid      int64     `json:"relatedoutorderid"  xorm:"'RELATEDOUTORDERID'"`           // 关联外部委托单ID
+	Accountid              int64     `json:"accountid"  xorm:"'ACCOUNTID'"`                           // 资金账号[外部母账户]
+	Hedgeaccountcode       string    `json:"hedgeaccountcode"  xorm:"'HEDGEACCOUNTCODE'"`             // 对冲账号
+	Marketid               int32     `json:"marketid"  xorm:"'MARKETID'"`                             // 市场ID
+	Hedgegoodsid           int64     `json:"hedgegoodsid"  xorm:"'HEDGEGOODSID'"`                     // 对冲合约ID
+	Buyorsell              int32     `json:"buyorsell"  xorm:"'BUYORSELL'"`                           // 买卖方向 - 0:买 1:卖
+	Channelbuildtype       int32     `json:"channelbuildtype"  xorm:"'CHANNELBUILDTYPE'"`             // 开平标志- 0:无 1:建仓 2:平仓
+	Closetype              int32     `json:"closetype"  xorm:"'CLOSETYPE'"`                           // 平仓方式 - 0:无 1:平今 2:平昨
+	Hedgeflag              int32     `json:"hedgeflag"  xorm:"'HEDGEFLAG'"`                           // 投机套保标志 - 0:无 1:投机 2:套保 3:套利
+	Tradeprice             float64   `json:"tradeprice"  xorm:"'TRADEPRICE'"`                         // 成交价格
+	Tradeqty               int64     `json:"tradeqty"  xorm:"'TRADEQTY'"`                             // 成交数量
+	Tradetime              time.Time `json:"tradetime"  xorm:"'TRADETIME'"`                           // 成交时间
+	Relatedmhpinnerorderid int64     `json:"relatedmhpinnerorderid"  xorm:"'RELATEDMHPINNERORDERID'"` // 接口平台委托单ID
+	Mhpinnertradeid        int64     `json:"mhpinnertradeid"  xorm:"'MHPINNERTRADEID'"`               // 接口平台成交单ID
+	Hasinnerorder          int32     `json:"hasinnerorder"  xorm:"'HASINNERORDER'"`                   // 是否有内部单关联 - 0:无 1:有
+	Isvalid                int32     `json:"isvalid"  xorm:"'ISVALID'"`                               // 是否有效 - 0:无效 1:有效
+	Optiontype             int32     `json:"optiontype"  xorm:"'OPTIONTYPE'"`                         // 期权类型 - 1:认购(看涨) 2:认沽(看跌)
+	Premium                float64   `json:"premium"  xorm:"'PREMIUM'"`                               // 权利金
+	Tradetype              int32     `json:"tradetype"  xorm:"'TRADETYPE'"`                           // 成交类别 - 1:正常委托成交3:修正持仓成交
+}
+
+// TableName is HEDGE_OUTTRADEDETAIL
+func (Hedgeouttradedetail) TableName() string {
+	return "HEDGE_OUTTRADEDETAIL"
+}
+
+// Hedgeinnerholderdetail 对冲内部持仓单表 - 导历史
+type Hedgeinnerholderdetail struct {
+	Tradeid         int64     `json:"tradeid"  xorm:"'TRADEID'" binding:"required"`     // 成交单号(108+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	Buyorsell       int32     `json:"buyorsell"  xorm:"'BUYORSELL'" binding:"required"` // 方向 - 0:买 1:卖
+	Tradedate       string    `json:"tradedate"  xorm:"'TRADEDATE'"`                    // 交易日(yyyyMMdd)
+	Marketid        int32     `json:"marketid"  xorm:"'MARKETID'"`                      // 市场ID
+	Goodsid         int32     `json:"goodsid"  xorm:"'GOODSID'"`                        // 商品ID
+	Accountid       int64     `json:"accountid"  xorm:"'ACCOUNTID'"`                    // 账号ID
+	Openqty         int64     `json:"openqty"  xorm:"'OPENQTY'"`                        // 建仓数量
+	Holderqty       int64     `json:"holderqty"  xorm:"'HOLDERQTY'"`                    // 持仓数量
+	Freezeqty       int64     `json:"freezeqty"  xorm:"'FREEZEQTY'"`                    // 冻结数量 - 按单平使用
+	Openprice       float64   `json:"openprice"  xorm:"'OPENPRICE'"`                    // 建仓价格
+	Holderprice     float64   `json:"holderprice"  xorm:"'HOLDERPRICE'"`                // 持仓价格
+	Tradeamount     float64   `json:"tradeamount"  xorm:"'TRADEAMOUNT'"`                // 成交金额[账户]
+	Holderamount    float64   `json:"holderamount"  xorm:"'HOLDERAMOUNT'"`              // 持仓金额 [商品币种]
+	Releaseamount   float64   `json:"releaseamount"  xorm:"'RELEASEAMOUNT'"`            // 释放持仓金额[商品币种]
+	Holderdays      int32     `json:"holderdays"  xorm:"'HOLDERDAYS'"`                  // 剩余冻结天数
+	Tradetime       time.Time `json:"tradetime"  xorm:"'TRADETIME'"`                    // 交易时间
+	Parentaccountid int64     `json:"parentaccountid"  xorm:"'PARENTACCOUNTID'"`        // 所属母账户
+}
+
+// TableName is HEDGE_INNERHOLDERDETAIL
+func (Hedgeinnerholderdetail) TableName() string {
+	return "HEDGE_INNERHOLDERDETAIL"
+}
+
 // Hedgeinnerorderdetail 对冲内部委托单表 - 导历史
 type Hedgeinnerorderdetail struct {
 	Orderid                 int64     `json:"orderid"  xorm:"'ORDERID'" binding:"required"`              // 委托单号(107+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)

+ 8 - 1
models/goods.go

@@ -69,9 +69,16 @@ func GetGoodsByGoodsCode(goodsCode string) (*Goods, error) {
 	engine := db.GetEngine()
 
 	var goods Goods
-	if _, err := engine.Where("GOODSCODE = ?", goodsCode).Get(&goods); err != nil {
+	has, err := engine.Where("GOODSCODE = ?", goodsCode).Get(&goods)
+	if err != nil {
 		return nil, err
 	}
+	if !has {
+		// 如果通过GoodsCode找不到,则尝试通过OutGoodsCode来查找
+		if _, err := engine.Where("OUTGOODSCODE = ?", goodsCode).Get(&goods); err != nil {
+			return nil, err
+		}
+	}
 
 	return &goods, nil
 }

+ 124 - 129
models/quote.go

@@ -52,135 +52,130 @@ type CycleData struct {
 
 // Quoteday 行情盘面
 type Quoteday struct {
-	Id                   int64   `xorm:"pk autoincr BIGINT(20)"`
-	Exchangedate         int64   `xorm:"not null BIGINT(20)"`
-	Goodscode            string  `xorm:"not null unique CHAR(10)"`
-	Exchangecode         int     `xorm:"INT(11)"`
-	Preclose             int64   `xorm:"default 0 BIGINT(20)"`
-	Opentime             int64   `xorm:"BIGINT(20)"`
-	Opened               int64   `xorm:"not null default 0 BIGINT(20)"`
-	Highest              int64   `xorm:"not null default 0 BIGINT(20)"`
-	Lowest               int64   `xorm:"not null default 0 BIGINT(20)"`
-	Lasttime             string  `xorm:"VARCHAR(20)"`
-	Utclasttime          int64   `xorm:"not null BIGINT(20)"`
-	Last                 int64   `xorm:"not null BIGINT(20)"`
-	Lastvolume           int64   `xorm:"default 0 BIGINT(20)"`
-	Lastturnover         int64   `xorm:"default 0 BIGINT(20)"`
-	Totalbidvolume       int64   `xorm:"default 0 BIGINT(20)"`
-	Totalaskvolume       int64   `xorm:"default 0 BIGINT(20)"`
-	Totalvolume          int64   `xorm:"default 0 BIGINT(20)"`
-	Totalturnover        int64   `xorm:"default 0 BIGINT(20)"`
-	Bid                  int64   `xorm:"default 0 BIGINT(20)"`
-	Bid2                 int64   `xorm:"default 0 BIGINT(20)"`
-	Bid3                 int64   `xorm:"default 0 BIGINT(20)"`
-	Bid4                 int64   `xorm:"default 0 BIGINT(20)"`
-	Bid5                 int64   `xorm:"default 0 BIGINT(20)"`
-	Bidvolume            int64   `xorm:"default 0 BIGINT(20)"`
-	Bidvolume2           int64   `xorm:"default 0 BIGINT(20)"`
-	Bidvolume3           int64   `xorm:"default 0 BIGINT(20)"`
-	Bidvolume4           int64   `xorm:"default 0 BIGINT(20)"`
-	Bidvolume5           int64   `xorm:"default 0 BIGINT(20)"`
-	Ask                  int64   `xorm:"default 0 BIGINT(20)"`
-	Ask2                 int64   `xorm:"default 0 BIGINT(20)"`
-	Ask3                 int64   `xorm:"default 0 BIGINT(20)"`
-	Ask4                 int64   `xorm:"default 0 BIGINT(20)"`
-	Ask5                 int64   `xorm:"default 0 BIGINT(20)"`
-	Askvolume            int64   `xorm:"default 0 BIGINT(20)"`
-	Askvolume2           int64   `xorm:"default 0 BIGINT(20)"`
-	Askvolume3           int64   `xorm:"default 0 BIGINT(20)"`
-	Askvolume4           int64   `xorm:"default 0 BIGINT(20)"`
-	Askvolume5           int64   `xorm:"default 0 BIGINT(20)"`
-	Presettle            int64   `xorm:"default 0 BIGINT(20)"`
-	Settle               int64   `xorm:"default 0 BIGINT(20)"`
-	Preholdvolume        int64   `xorm:"default 0 BIGINT(20)"`
-	Holdvolume           int64   `xorm:"default 0 BIGINT(20)"`
-	Averageprice         int64   `xorm:"default 0 BIGINT(20)"`
-	Orderid              int64   `xorm:"default 0 BIGINT(20)"`
-	Limitup              int64   `xorm:"default 0 BIGINT(20)"`
-	Limitdown            int64   `xorm:"default 0 BIGINT(20)"`
-	Inventory            int64   `xorm:"default 0 BIGINT(20)"`
-	Holdincrement        int64   `xorm:"default 0 BIGINT(20)"`
-	Iscleared            int     `xorm:"INT(11)"`
-	Issettled            int     `xorm:"INT(11)"`
-	Hightime             string  `xorm:"VARCHAR(30)"`
-	Lowtime              string  `xorm:"VARCHAR(30)"`
-	Bidqueueinfo         string  `xorm:"VARCHAR(2000)"`
-	Askqueueinfo         string  `xorm:"VARCHAR(2000)"`
-	Bidorderid           int64   `xorm:"BIGINT(20)"`
-	Bidorderid2          int64   `xorm:"BIGINT(20)"`
-	Bidorderid3          int64   `xorm:"BIGINT(20)"`
-	Bidorderid4          int64   `xorm:"BIGINT(20)"`
-	Bidorderid5          int64   `xorm:"BIGINT(20)"`
-	Askorderid           int64   `xorm:"BIGINT(20)"`
-	Askorderid2          int64   `xorm:"BIGINT(20)"`
-	Askorderid3          int64   `xorm:"BIGINT(20)"`
-	Askorderid4          int64   `xorm:"BIGINT(20)"`
-	Askorderid5          int64   `xorm:"BIGINT(20)"`
-	Originalturnover     float64 `xorm:"default 0 DOUBLE"`
-	Lastlot              int64   `xorm:"BIGINT(20)"`
-	Totallot             int64   `xorm:"BIGINT(20)"`
-	Strikeprice          int64   `xorm:"BIGINT(20)"`
-	Cleartime            int64   `xorm:"BIGINT(20)"`
-	Calloptionpremiums   int64   `xorm:"default 0 BIGINT(20)"`
-	Calloptionpremiums2  int64   `xorm:"default 0 BIGINT(20)"`
-	Calloptionpremiums3  int64   `xorm:"default 0 BIGINT(20)"`
-	Calloptionpremiums4  int64   `xorm:"default 0 BIGINT(20)"`
-	Calloptionpremiums5  int64   `xorm:"default 0 BIGINT(20)"`
-	Putoptionpremiums    int64   `xorm:"default 0 BIGINT(20)"`
-	Putoptionpremiums2   int64   `xorm:"default 0 BIGINT(20)"`
-	Putoptionpremiums3   int64   `xorm:"default 0 BIGINT(20)"`
-	Putoptionpremiums4   int64   `xorm:"default 0 BIGINT(20)"`
-	Putoptionpremiums5   int64   `xorm:"default 0 BIGINT(20)"`
-	Nontotalvolume       int64   `xorm:"default 0 BIGINT(20)"`
-	Nontotalholdervolume int64   `xorm:"default 0 BIGINT(20)"`
-	Nontotalturnover     int64   `xorm:"default 0 BIGINT(20)"`
-	Nontotallot          int64   `xorm:"default 0 BIGINT(20)"`
-	Markprice            int64   `xorm:"default 0 BIGINT(20)"`
-	Fundsrate            int64   `xorm:"default 0 BIGINT(20)"`
-	Publictradetype      string  `xorm:"VARCHAR(2)"`
-	Iep                  int64   `xorm:"default 0 BIGINT(20)"`
-	Iev                  int64   `xorm:"default 0 BIGINT(20)"`
-	Grepmarketprice      int64   `xorm:"default 0 BIGINT(20)"`
-	Bid6                 int64   `xorm:"default 0 BIGINT(20)"`
-	Bid7                 int64   `xorm:"default 0 BIGINT(20)"`
-	Bid8                 int64   `xorm:"default 0 BIGINT(20)"`
-	Bid9                 int64   `xorm:"default 0 BIGINT(20)"`
-	Bid10                int64   `xorm:"default 0 BIGINT(20)"`
-	Bidvolume6           int64   `xorm:"default 0 BIGINT(20)"`
-	Bidvolume7           int64   `xorm:"default 0 BIGINT(20)"`
-	Bidvolume8           int64   `xorm:"default 0 BIGINT(20)"`
-	Bidvolume9           int64   `xorm:"default 0 BIGINT(20)"`
-	Bidvolume10          int64   `xorm:"default 0 BIGINT(20)"`
-	Ask6                 int64   `xorm:"default 0 BIGINT(20)"`
-	Ask7                 int64   `xorm:"default 0 BIGINT(20)"`
-	Ask8                 int64   `xorm:"default 0 BIGINT(20)"`
-	Ask9                 int64   `xorm:"default 0 BIGINT(20)"`
-	Ask10                int64   `xorm:"default 0 BIGINT(20)"`
-	Askvolume6           int64   `xorm:"default 0 BIGINT(20)"`
-	Askvolume7           int64   `xorm:"default 0 BIGINT(20)"`
-	Askvolume8           int64   `xorm:"default 0 BIGINT(20)"`
-	Askvolume9           int64   `xorm:"default 0 BIGINT(20)"`
-	Askvolume10          int64   `xorm:"default 0 BIGINT(20)"`
-	Bidordervolume       int64   `xorm:"default 0 BIGINT(20)"`
-	Bidordervolume2      int64   `xorm:"default 0 BIGINT(20)"`
-	Bidordervolume3      int64   `xorm:"default 0 BIGINT(20)"`
-	Bidordervolume4      int64   `xorm:"default 0 BIGINT(20)"`
-	Bidordervolume5      int64   `xorm:"default 0 BIGINT(20)"`
-	Bidordervolume6      int64   `xorm:"default 0 BIGINT(20)"`
-	Bidordervolume7      int64   `xorm:"default 0 BIGINT(20)"`
-	Bidordervolume8      int64   `xorm:"default 0 BIGINT(20)"`
-	Bidordervolume9      int64   `xorm:"default 0 BIGINT(20)"`
-	Bidordervolume10     int64   `xorm:"default 0 BIGINT(20)"`
-	Askordervolume       int64   `xorm:"default 0 BIGINT(20)"`
-	Askordervolume2      int64   `xorm:"default 0 BIGINT(20)"`
-	Askordervolume3      int64   `xorm:"default 0 BIGINT(20)"`
-	Askordervolume4      int64   `xorm:"default 0 BIGINT(20)"`
-	Askordervolume5      int64   `xorm:"default 0 BIGINT(20)"`
-	Askordervolume6      int64   `xorm:"default 0 BIGINT(20)"`
-	Askordervolume7      int64   `xorm:"default 0 BIGINT(20)"`
-	Askordervolume8      int64   `xorm:"default 0 BIGINT(20)"`
-	Askordervolume9      int64   `xorm:"default 0 BIGINT(20)"`
-	Askordervolume10     int64   `xorm:"default 0 BIGINT(20)"`
+	Id                   int64  `xorm:"pk autoincr BIGINT(20)"`
+	Exchangedate         int64  `xorm:"not null BIGINT(20)"`           // 交易日
+	Goodscode            string `xorm:"not null unique CHAR(10)"`      // 商品代码
+	Exchangecode         int    `xorm:"INT(11)"`                       // 交易所代码
+	Preclose             int64  `xorm:"default 0 BIGINT(20)"`          // 昨收
+	Opentime             int64  `xorm:"BIGINT(20)"`                    // 开盘时间
+	Opened               int64  `xorm:"not null default 0 BIGINT(20)"` // 开盘价
+	Highest              int64  `xorm:"not null default 0 BIGINT(20)"` // 最高价
+	Lowest               int64  `xorm:"not null default 0 BIGINT(20)"` // 最低价
+	Lasttime             string `xorm:"VARCHAR(20)"`                   // 行情时间(只有现价变化行情时间才变化)
+	Utclasttime          int64  `xorm:"not null BIGINT(20)"`           // utc的行情时间
+	Last                 int64  `xorm:"not null BIGINT(20)"`           // 最新价
+	Lastvolume           int64  `xorm:"default 0 BIGINT(20)"`          // 最新成交量
+	Lastturnover         int64  `xorm:"default 0 BIGINT(20)"`          // 最新成交金额
+	Totalbidvolume       int64  `xorm:"default 0 BIGINT(20)"`          // 外盘
+	Totalaskvolume       int64  `xorm:"default 0 BIGINT(20)"`          // 内盘
+	Totalvolume          int64  `xorm:"default 0 BIGINT(20)"`          // 总量
+	Totalturnover        int64  `xorm:"default 0 BIGINT(20)"`          // 总金额
+	Bid                  int64  `xorm:"default 0 BIGINT(20)"`          // 买1
+	Bid2                 int64  `xorm:"default 0 BIGINT(20)"`          // 买2
+	Bid3                 int64  `xorm:"default 0 BIGINT(20)"`          // 买3
+	Bid4                 int64  `xorm:"default 0 BIGINT(20)"`          // 买4
+	Bid5                 int64  `xorm:"default 0 BIGINT(20)"`          // 买5
+	Bidvolume            int64  `xorm:"default 0 BIGINT(20)"`          // 买量1
+	Bidvolume2           int64  `xorm:"default 0 BIGINT(20)"`          // 买量2
+	Bidvolume3           int64  `xorm:"default 0 BIGINT(20)"`          // 买量3
+	Bidvolume4           int64  `xorm:"default 0 BIGINT(20)"`          // 买量4
+	Bidvolume5           int64  `xorm:"default 0 BIGINT(20)"`          // 买量5
+	Ask                  int64  `xorm:"default 0 BIGINT(20)"`          // 卖1
+	Ask2                 int64  `xorm:"default 0 BIGINT(20)"`          // 卖2
+	Ask3                 int64  `xorm:"default 0 BIGINT(20)"`          // 卖3
+	Ask4                 int64  `xorm:"default 0 BIGINT(20)"`          // 卖4
+	Ask5                 int64  `xorm:"default 0 BIGINT(20)"`          // 卖5
+	Askvolume            int64  `xorm:"default 0 BIGINT(20)"`          // 卖量1
+	Askvolume2           int64  `xorm:"default 0 BIGINT(20)"`          // 卖量2
+	Askvolume3           int64  `xorm:"default 0 BIGINT(20)"`          // 卖量3
+	Askvolume4           int64  `xorm:"default 0 BIGINT(20)"`          // 卖量4
+	Askvolume5           int64  `xorm:"default 0 BIGINT(20)"`          // 卖量5
+	Presettle            int64  `xorm:"default 0 BIGINT(20)"`          // 昨结价
+	Settle               int64  `xorm:"default 0 BIGINT(20)"`          // 结算价
+	Preholdvolume        int64  `xorm:"default 0 BIGINT(20)"`          // 昨持仓
+	Holdvolume           int64  `xorm:"default 0 BIGINT(20)"`          // 持仓
+	Averageprice         int64  `xorm:"default 0 BIGINT(20)"`          // 均价
+	Orderid              int64  `xorm:"default 0 BIGINT(20)"`          // 序号
+	Limitup              int64  `xorm:"default 0 BIGINT(20)"`          // 涨停价
+	Limitdown            int64  `xorm:"default 0 BIGINT(20)"`          // 跌停价
+	Inventory            int64  `xorm:"default 0 BIGINT(20)"`          // 库存
+	Holdincrement        int64  `xorm:"default 0 BIGINT(20)"`          // 单笔持仓
+	Iscleared            int    `xorm:"INT(11)"`                       // 是否清盘标志
+	Issettled            int    `xorm:"INT(11)"`                       // 是否结算标志
+	Bidqueueinfo         string `xorm:"VARCHAR(2000)"`                 // 大利市买港股用
+	Askqueueinfo         string `xorm:"VARCHAR(2000)"`                 // 大利市卖港股用
+	Bidorderid           int64  `xorm:"BIGINT(20)"`                    // 买单号1
+	Bidorderid2          int64  `xorm:"BIGINT(20)"`                    // 买单号2
+	Bidorderid3          int64  `xorm:"BIGINT(20)"`                    // 买单号3
+	Bidorderid4          int64  `xorm:"BIGINT(20)"`                    // 买单号4
+	Bidorderid5          int64  `xorm:"BIGINT(20)"`                    // 买单号5
+	Askorderid           int64  `xorm:"BIGINT(20)"`                    // 卖单号1
+	Askorderid2          int64  `xorm:"BIGINT(20)"`                    // 卖单号2
+	Askorderid3          int64  `xorm:"BIGINT(20)"`                    // 卖单号3
+	Askorderid4          int64  `xorm:"BIGINT(20)"`                    // 卖单号4
+	Askorderid5          int64  `xorm:"BIGINT(20)"`                    // 卖单号5
+	Lastlot              int64  `xorm:"BIGINT(20)"`                    // 最新成交手数
+	Totallot             int64  `xorm:"BIGINT(20)"`                    // 总手数
+	Strikeprice          int64  `xorm:"BIGINT(20)"`                    // 发行价
+	Cleartime            int64  `xorm:"BIGINT(20)"`                    // 清盘时间
+	Calloptionpremiums   int64  `xorm:"default 0 BIGINT(20)"`          // 认购期权1
+	Calloptionpremiums2  int64  `xorm:"default 0 BIGINT(20)"`          // 认购期权2
+	Calloptionpremiums3  int64  `xorm:"default 0 BIGINT(20)"`          // 认购期权3
+	Calloptionpremiums4  int64  `xorm:"default 0 BIGINT(20)"`          // 认购期权4
+	Calloptionpremiums5  int64  `xorm:"default 0 BIGINT(20)"`          // 认购期权5
+	Putoptionpremiums    int64  `xorm:"default 0 BIGINT(20)"`          // 认沽期权1
+	Putoptionpremiums2   int64  `xorm:"default 0 BIGINT(20)"`          // 认沽期权2
+	Putoptionpremiums3   int64  `xorm:"default 0 BIGINT(20)"`          // 认沽期权3
+	Putoptionpremiums4   int64  `xorm:"default 0 BIGINT(20)"`          // 认沽期权4
+	Putoptionpremiums5   int64  `xorm:"default 0 BIGINT(20)"`          // 认沽期权5
+	Nontotalvolume       int64  `xorm:"default 0 BIGINT(20)"`          // 非交易总量
+	Nontotalholdervolume int64  `xorm:"default 0 BIGINT(20)"`          // 非交易持仓量
+	Nontotalturnover     int64  `xorm:"default 0 BIGINT(20)"`          // 非交易总金额
+	Nontotallot          int64  `xorm:"default 0 BIGINT(20)"`          // 非交易总手数
+	Publictradetype      string `xorm:"VARCHAR(2)"`                    //   公共交易标志类型 港股专用
+	Iep                  int64  `xorm:"default 0 BIGINT(20)"`          // 平衡价 港股专用
+	Iev                  int64  `xorm:"default 0 BIGINT(20)"`          // 平衡量 港股专用
+	Grepmarketprice      int64  `xorm:"default 0 BIGINT(20)"`          // 暗盘价 港股专用
+	Bid6                 int64  `xorm:"default 0 BIGINT(20)"`          //  买6
+	Bid7                 int64  `xorm:"default 0 BIGINT(20)"`          // 买7
+	Bid8                 int64  `xorm:"default 0 BIGINT(20)"`          // 买8
+	Bid9                 int64  `xorm:"default 0 BIGINT(20)"`          // 买9
+	Bid10                int64  `xorm:"default 0 BIGINT(20)"`          // 买10
+	Bidvolume6           int64  `xorm:"default 0 BIGINT(20)"`          // 买量6
+	Bidvolume7           int64  `xorm:"default 0 BIGINT(20)"`          // 买量7
+	Bidvolume8           int64  `xorm:"default 0 BIGINT(20)"`          // 买量8
+	Bidvolume9           int64  `xorm:"default 0 BIGINT(20)"`          // 买量9
+	Bidvolume10          int64  `xorm:"default 0 BIGINT(20)"`          // 买量10
+	Ask6                 int64  `xorm:"default 0 BIGINT(20)"`          // 卖6
+	Ask7                 int64  `xorm:"default 0 BIGINT(20)"`          // 卖7
+	Ask8                 int64  `xorm:"default 0 BIGINT(20)"`          // 卖8
+	Ask9                 int64  `xorm:"default 0 BIGINT(20)"`          // 卖9
+	Ask10                int64  `xorm:"default 0 BIGINT(20)"`          // 卖10
+	Askvolume6           int64  `xorm:"default 0 BIGINT(20)"`          // 卖量6
+	Askvolume7           int64  `xorm:"default 0 BIGINT(20)"`          // 卖量7
+	Askvolume8           int64  `xorm:"default 0 BIGINT(20)"`          // 卖量8
+	Askvolume9           int64  `xorm:"default 0 BIGINT(20)"`          // 卖量9
+	Askvolume10          int64  `xorm:"default 0 BIGINT(20)"`          // 卖量10
+	Bidordervolume       int64  `xorm:"default 0 BIGINT(20)"`          // 买单量1
+	Bidordervolume2      int64  `xorm:"default 0 BIGINT(20)"`          // 买单量2
+	Bidordervolume3      int64  `xorm:"default 0 BIGINT(20)"`          // 买单量3
+	Bidordervolume4      int64  `xorm:"default 0 BIGINT(20)"`          // 买单量4
+	Bidordervolume5      int64  `xorm:"default 0 BIGINT(20)"`          // 买单量5
+	Bidordervolume6      int64  `xorm:"default 0 BIGINT(20)"`          // 买单量6
+	Bidordervolume7      int64  `xorm:"default 0 BIGINT(20)"`          // 买单量7
+	Bidordervolume8      int64  `xorm:"default 0 BIGINT(20)"`          // 买单量8
+	Bidordervolume9      int64  `xorm:"default 0 BIGINT(20)"`          // 买单量9
+	Bidordervolume10     int64  `xorm:"default 0 BIGINT(20)"`          // 买单量10
+	Askordervolume       int64  `xorm:"default 0 BIGINT(20)"`          // 卖单量1
+	Askordervolume2      int64  `xorm:"default 0 BIGINT(20)"`          // 卖单量2
+	Askordervolume3      int64  `xorm:"default 0 BIGINT(20)"`          // 卖单量3
+	Askordervolume4      int64  `xorm:"default 0 BIGINT(20)"`          // 卖单量4
+	Askordervolume5      int64  `xorm:"default 0 BIGINT(20)"`          // 卖单量5
+	Askordervolume6      int64  `xorm:"default 0 BIGINT(20)"`          // 卖单量6
+	Askordervolume7      int64  `xorm:"default 0 BIGINT(20)"`          // 卖单量7
+	Askordervolume8      int64  `xorm:"default 0 BIGINT(20)"`          // 卖单量8
+	Askordervolume9      int64  `xorm:"default 0 BIGINT(20)"`          // 卖单量9
+	Askordervolume10     int64  `xorm:"default 0 BIGINT(20)"`          // 卖单量10
 }
 
 // TableName is Quoteday

+ 2 - 0
routers/router.go

@@ -157,6 +157,8 @@ func InitRouter() *gin.Engine {
 		quoteR.GET("/QueryHistoryDatas", quote.QueryHistoryDatas)
 		// 查询行情历史数据
 		quoteR.GET("/QueryTSData", quote.QueryTSData)
+		// 获取商品盘面信息
+		quoteR.GET("/QueryQuoteDay", quote.QueryQuoteDay)
 	}
 	// ************************ 检索服务 ************************
 	searchR := apiR.Group("Search")

+ 4 - 0
utils/mathUtils.go

@@ -30,6 +30,10 @@ func SortInIntSlice(haystack []int, needle int) bool {
 
 // IntToFloat64 IntToFloat64 高精度转
 func IntToFloat64(value int, decimal int) float64 {
+	if value == 0 {
+		return 0
+	}
+
 	numrator, _ := new(big.Float).SetPrec(uint(1024)).SetString(strconv.Itoa(value))
 
 	denominator := big.NewFloat(math.Pow10(decimal))