diff --git a/pkg/bbgo/environment.go b/pkg/bbgo/environment.go index 3a0a9bdd4..6ef2d3440 100644 --- a/pkg/bbgo/environment.go +++ b/pkg/bbgo/environment.go @@ -623,6 +623,10 @@ func (environ *Environment) Sync(ctx context.Context, userConfig ...*Config) err return err } + if len(userConfig) == 0 { + continue + } + if userConfig[0].Sync.DepositHistory { if err := environ.SyncService.SyncDepositHistory(ctx, session.Exchange); err != nil { return err