From 3d1a481115da02944b18f4c6543192365dbaa224 Mon Sep 17 00:00:00 2001 From: c9s Date: Sat, 14 Dec 2024 15:43:08 +0800 Subject: [PATCH] bbgo: improve balance log format --- pkg/bbgo/session.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/bbgo/session.go b/pkg/bbgo/session.go index de77fa109..87f611501 100644 --- a/pkg/bbgo/session.go +++ b/pkg/bbgo/session.go @@ -368,8 +368,10 @@ func (session *ExchangeSession) Init(ctx context.Context, environ *Environment) } session.setAccount(account) - session.metricsBalancesUpdater(account.Balances()) - logger.Infof("account %s balances:\n%s", session.Name, account.Balances().String()) + + balances := account.Balances() + session.metricsBalancesUpdater(balances) + logger.Infof("session %s account balances:\n%s", session.Name, balances.NotZero().String()) } // forward trade updates and order updates to the order executor