mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
grid2: fix fee reduction by rounding
This commit is contained in:
parent
2a47d390f0
commit
37535e9f3e
|
@ -373,9 +373,11 @@ func (s *Strategy) processFilledOrder(o types.Order) {
|
|||
// if we don't reduce the sell quantity, than we might fail to place the sell order
|
||||
if o.Side == types.SideTypeBuy {
|
||||
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)
|
||||
s.logger.Infof("GRID BUY ORDER BASE FEE (Rounding): %s %s", baseSellQuantityReduction.String(), s.Market.BaseCurrency)
|
||||
|
||||
newQuantity = newQuantity.Sub(baseSellQuantityReduction)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user