mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-27 01:05:15 +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 := q.Mul(price)
|
||||||
|
requiredQuoteAmount = requiredQuoteAmount.Round(market.PricePrecision, fixedpoint.Up)
|
||||||
if requiredQuoteAmount.Compare(quoteBalance.Available) < 0 {
|
if requiredQuoteAmount.Compare(quoteBalance.Available) < 0 {
|
||||||
log.Warnf("required quote amount %f < quote balance %v", requiredQuoteAmount.Float64(), quoteBalance)
|
log.Warnf("required quote amount %f < quote balance %v", requiredQuoteAmount.Float64(), quoteBalance)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue
Block a user