From f6bf93987f432b8ede12fc9e7e6ac1c81bc28903 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 29 Nov 2024 22:03:08 +0800 Subject: [PATCH] xmaker: use total balance for MaxQuoteQuotaRatio --- pkg/strategy/xmaker/strategy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/strategy/xmaker/strategy.go b/pkg/strategy/xmaker/strategy.go index 46a0ce1ff1..8e03da53b9 100644 --- a/pkg/strategy/xmaker/strategy.go +++ b/pkg/strategy/xmaker/strategy.go @@ -809,7 +809,7 @@ func (s *Strategy) updateQuote(ctx context.Context) error { if b, ok := makerBalances[s.makerMarket.QuoteCurrency]; ok { if b.Available.Compare(s.makerMarket.MinNotional) > 0 { if s.MaxQuoteQuotaRatio.Sign() > 0 { - quoteAvailable := b.Available.Mul(s.MaxQuoteQuotaRatio) + quoteAvailable := b.Total().Mul(s.MaxQuoteQuotaRatio) makerQuota.QuoteAsset.Add(quoteAvailable) } else { // use all quote balances as much as possible