mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
xalign: round up requiredQuoteAmount
This commit is contained in:
parent
8baafdf329
commit
f6f3293191
|
@ -139,6 +139,7 @@ func (s *Strategy) selectSessionForCurrency(ctx context.Context, sessions map[st
|
|||
}
|
||||
|
||||
requiredQuoteAmount := q.Mul(price)
|
||||
requiredQuoteAmount = requiredQuoteAmount.Round(market.PricePrecision, fixedpoint.Up)
|
||||
if requiredQuoteAmount.Compare(quoteBalance.Available) < 0 {
|
||||
log.Warnf("required quote amount %f < quote balance %v", requiredQuoteAmount.Float64(), quoteBalance)
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue
Block a user