From 87b05ebd99dec2a96dc11ad9cf2534b3ae1318a9 Mon Sep 17 00:00:00 2001 From: hucan <951870319@qq.com> Date: Mon, 10 Feb 2025 18:26:12 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0=E6=BA=A2=E4=BB=B7?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/models/line_system_setting.go | 2 ++ app/admin/service/dto/line_system_setting.go | 2 ++ services/binanceservice/futuresrest.go | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/admin/models/line_system_setting.go b/app/admin/models/line_system_setting.go index 9cc3077..97cec09 100644 --- a/app/admin/models/line_system_setting.go +++ b/app/admin/models/line_system_setting.go @@ -14,6 +14,8 @@ type LineSystemSetting struct { ProfitRate string `json:"profitRate" gorm:"type:decimal(10,2);comment:平仓盈利比例"` CoverOrderTypeBRate string `json:"coverOrderTypeBRate" gorm:"type:decimal(10,2);comment:b账户限价补单的买入百分比"` StopLossPremium decimal.Decimal `json:"stopLossPremium" gorm:"type:decimal(10,2);comment:限价止损溢价百分比"` + AddPositionPremium decimal.Decimal `json:"addPositionPremium" gorm:"type:decimal(10,2);comment:限价加仓溢价百分比` + ReducePremium decimal.Decimal `json:"reducePremium" gorm:"type:decimal(10,2);comment:限价减仓溢价百分比"` models.ModelTime models.ControlBy } diff --git a/app/admin/service/dto/line_system_setting.go b/app/admin/service/dto/line_system_setting.go index d539f28..65fc4ec 100644 --- a/app/admin/service/dto/line_system_setting.go +++ b/app/admin/service/dto/line_system_setting.go @@ -63,6 +63,8 @@ type LineSystemSettingUpdateReq struct { ProfitRate string `json:"profitRate" comment:"平仓盈利比例"` CoverOrderTypeBRate string `json:"coverOrderTypeBRate" comment:"b账户限价补单的买入百分比"` StopLossPremium decimal.Decimal `json:"stopLossPremium" comment:"限价止损溢价"` + AddPositionPremium decimal.Decimal `json:"addPositionPremium" comment:"限价加仓溢价"` + ReducePremium decimal.Decimal `json:"reducePremium" comment:"限价减仓溢价"` common.ControlBy } diff --git a/services/binanceservice/futuresrest.go b/services/binanceservice/futuresrest.go index b1768a2..ea59d08 100644 --- a/services/binanceservice/futuresrest.go +++ b/services/binanceservice/futuresrest.go @@ -518,7 +518,7 @@ func handleFutMainOrderFilled(db *gorm.DB, preOrder *models.LinePreOrder) { // 减仓单 func processFutReduceOrder(db *gorm.DB, order DbModels.LinePreOrder, price, num decimal.Decimal) { - + // key := fmt.Sprintf(rediskey.SpotReduceList, global.EXCHANGE_BINANCE) } // 处理止盈订单