grid2: always round up

This commit is contained in:
c9s 2023-02-24 12:46:38 +08:00
parent 37535e9f3e
commit 5b903cd4ed
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

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