1、增加溢价配置

This commit is contained in:
2025-02-10 18:26:12 +08:00
parent 7f8fe583d4
commit 87b05ebd99
3 changed files with 5 additions and 1 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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)
}
// 处理止盈订单