1
This commit is contained in:
@ -320,7 +320,7 @@ func (req LineAddPreOrderReq) Valid() error {
|
||||
if v.AddType == 1 && v.TakeProfitNumRatio.Cmp(decimal.NewFromInt(100)) < 0 &&
|
||||
v.TakeProfitNumRatio.Cmp(decimal.Zero) > 0 &&
|
||||
(v.TpTpPriceRatio.IsZero() || v.TpTpPriceRatio.Cmp(decimal.NewFromInt(100)) > 0) {
|
||||
return errors.New("止盈后止盈价格不正确")
|
||||
return errors.New("第二止盈价格不正确")
|
||||
}
|
||||
}
|
||||
|
||||
@ -461,7 +461,7 @@ func (req LineBatchAddPreOrderReq) CheckParams() error {
|
||||
if v.AddType == 1 && v.TakeProfitNumRatio.Cmp(decimal.NewFromInt(100)) < 0 &&
|
||||
v.TakeProfitNumRatio.Cmp(decimal.Zero) > 0 &&
|
||||
(v.TpTpPriceRatio.IsZero() || v.TpTpPriceRatio.Cmp(decimal.NewFromInt(100)) > 0) {
|
||||
return errors.New("止盈后止盈价格不正确")
|
||||
return errors.New("第二止盈价格不正确")
|
||||
}
|
||||
|
||||
// if v.TpSlPriceRatio.Cmp(decimal.Zero) <= 0 || v.TpSlPriceRatio.Cmp(decimal.NewFromInt(100)) > 0 {
|
||||
|
||||
@ -1120,7 +1120,7 @@ func (e *LinePreOrder) AddBatchPreOrder(batchReq *dto.LineBatchAddPreOrderReq, p
|
||||
req.Price = batchReq.Price
|
||||
req.Profit = batchReq.Profit
|
||||
req.ProfitNumRatio = batchReq.ProfitNumRatio
|
||||
req.ProfitTpTpPriceRatio = batchReq.ProfitTpSlPriceRatio
|
||||
req.ProfitTpTpPriceRatio = batchReq.ProfitTpTpPriceRatio
|
||||
req.ProfitTpSlPriceRatio = batchReq.ProfitTpSlPriceRatio
|
||||
req.Ext = batchReq.Ext
|
||||
req.SymbolType = batchReq.SymbolType
|
||||
|
||||
Reference in New Issue
Block a user