diff --git a/pkg/strategy/grid2/strategy.go b/pkg/strategy/grid2/strategy.go index 7c7c6288ea..eafd1c6390 100644 --- a/pkg/strategy/grid2/strategy.go +++ b/pkg/strategy/grid2/strategy.go @@ -503,7 +503,6 @@ func (s *Strategy) processFilledOrder(o types.Order) { newQuantity = newQuantity.Round(s.Market.VolumePrecision, fixedpoint.Down) s.logger.Infof("round down %s %s order base quantity %s to %s by base precision %d", s.Symbol, newSide, origQuantity.String(), newQuantity.String(), s.Market.VolumePrecision) - newQuantity = fixedpoint.Max(newQuantity, s.Market.MinQuantity) } else if s.QuantityOrAmount.Quantity.Sign() > 0 { newQuantity = s.QuantityOrAmount.Quantity } @@ -527,7 +526,7 @@ func (s *Strategy) processFilledOrder(o types.Order) { // if EarnBase is enabled, we should sell less to get the same quote amount back if s.EarnBase { - newQuantity = fixedpoint.Max(orderExecutedQuoteAmount.Div(newPrice).Sub(fee), s.Market.MinQuantity) + newQuantity = orderExecutedQuoteAmount.Div(newPrice).Sub(fee) } // always round down the base quantity for placing sell order to avoid the base currency fund locking issue