skip public session

This commit is contained in:
narumi 2023-10-19 15:14:28 +08:00
parent 6b273eda4d
commit 900db74fb9

View File

@ -82,6 +82,11 @@ func (s *Strategy) recordNetAssetValue(ctx context.Context, sessions map[string]
// iterate the sessions and record them // iterate the sessions and record them
quoteCurrency := "USDT" quoteCurrency := "USDT"
for sessionName, session := range sessions { for sessionName, session := range sessions {
if session.PublicOnly {
log.Infof("session %s is public only, skip", sessionName)
continue
}
// update the account balances and the margin information // update the account balances and the margin information
if _, err := session.UpdateAccount(ctx); err != nil { if _, err := session.UpdateAccount(ctx); err != nil {
log.WithError(err).Errorf("can not update account") log.WithError(err).Errorf("can not update account")