Merge pull request #1346 from c9s/narumi/xnav/skip-public

FIX: [xnav] skip public only session
This commit is contained in:
なるみ 2023-10-19 15:33:33 +08:00 committed by GitHub
commit 5dbb7bdde8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,6 +82,11 @@ func (s *Strategy) recordNetAssetValue(ctx context.Context, sessions map[string]
// iterate the sessions and record them
quoteCurrency := "USDT"
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
if _, err := session.UpdateAccount(ctx); err != nil {
log.WithError(err).Errorf("can not update account")