From 5b903cd4ed1e1f95c176d70dc73069ade34b5f8a Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 24 Feb 2023 12:46:38 +0800 Subject: [PATCH] grid2: always round up --- pkg/strategy/grid2/strategy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/strategy/grid2/strategy.go b/pkg/strategy/grid2/strategy.go index 5fb48ffeb..c4a531a91 100644 --- a/pkg/strategy/grid2/strategy.go +++ b/pkg/strategy/grid2/strategy.go @@ -375,7 +375,7 @@ func (s *Strategy) processFilledOrder(o types.Order) { baseSellQuantityReduction = s.aggregateOrderBaseFee(o) s.logger.Infof("GRID BUY ORDER BASE FEE: %s %s", baseSellQuantityReduction.String(), s.Market.BaseCurrency) - baseSellQuantityReduction = baseSellQuantityReduction.Round(s.Market.VolumePrecision, fixedpoint.HalfUp) + baseSellQuantityReduction = baseSellQuantityReduction.Round(s.Market.VolumePrecision, fixedpoint.Up) s.logger.Infof("GRID BUY ORDER BASE FEE (Rounding): %s %s", baseSellQuantityReduction.String(), s.Market.BaseCurrency) newQuantity = newQuantity.Sub(baseSellQuantityReduction)