Skip to content

Commit

Permalink
xmaker: use total balance for MaxQuoteQuotaRatio
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Nov 29, 2024
1 parent 98801ad commit f6bf939
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/strategy/xmaker/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f6bf939

Please sign in to comment.