Skip to content

Commit

Permalink
bbgo: improve balance log format
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Dec 14, 2024
1 parent 97c5db3 commit 3d1a481
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/bbgo/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d1a481

Please sign in to comment.