xalign:add one more dust check

This commit is contained in:
c9s 2023-06-13 13:53:51 +08:00
parent 599b18fc3c
commit 476378e742
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -155,6 +155,11 @@ func (s *Strategy) selectSessionForCurrency(ctx context.Context, sessions map[st
continue continue
} }
if market.IsDustQuantity(q, price) {
log.Infof("%s ignore dust quantity: %f", currency, q.Float64())
return nil, nil
}
q = market.AdjustQuantityByMinNotional(q, price) q = market.AdjustQuantityByMinNotional(q, price)
return session, &types.SubmitOrder{ return session, &types.SubmitOrder{