xmaker: check dust quantity

This commit is contained in:
c9s 2024-10-15 13:40:31 +08:00
parent 76a627a504
commit d940cde945
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -1027,7 +1027,7 @@ func (s *Strategy) tryArbitrage(ctx context.Context, quote *Quote, makerBalances
return false, nil return false, nil
} }
if qty.IsZero() { if qty.IsZero() || s.makerMarket.IsDustQuantity(qty, sumPv.Price) {
return false, nil return false, nil
} }
@ -1057,7 +1057,7 @@ func (s *Strategy) tryArbitrage(ctx context.Context, quote *Quote, makerBalances
return false, nil return false, nil
} }
if qty.IsZero() { if qty.IsZero() || s.makerMarket.IsDustQuantity(qty, sumPv.Price) {
return false, nil return false, nil
} }