mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
bbgo: add passphrase field to session struct
This commit is contained in:
parent
dd22776a7e
commit
307d0b8e1f
|
@ -163,6 +163,7 @@ type ExchangeSession struct {
|
||||||
EnvVarPrefix string `json:"envVarPrefix" yaml:"envVarPrefix"`
|
EnvVarPrefix string `json:"envVarPrefix" yaml:"envVarPrefix"`
|
||||||
Key string `json:"key,omitempty" yaml:"key,omitempty"`
|
Key string `json:"key,omitempty" yaml:"key,omitempty"`
|
||||||
Secret string `json:"secret,omitempty" yaml:"secret,omitempty"`
|
Secret string `json:"secret,omitempty" yaml:"secret,omitempty"`
|
||||||
|
Passphrase string `json:"passphrase,omitempty" yaml:"passphrase,omitempty"`
|
||||||
SubAccount string `json:"subAccount,omitempty" yaml:"subAccount,omitempty"`
|
SubAccount string `json:"subAccount,omitempty" yaml:"subAccount,omitempty"`
|
||||||
|
|
||||||
// Withdrawal is used for enabling withdrawal functions
|
// Withdrawal is used for enabling withdrawal functions
|
||||||
|
@ -693,7 +694,7 @@ func InitExchangeSession(name string, session *ExchangeSession, exchange types.E
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exchange, err = cmdutil.NewExchangeStandard(exchangeName, session.Key, session.Secret, "", session.SubAccount)
|
exchange, err = cmdutil.NewExchangeStandard(exchangeName, session.Key, session.Secret, session.Passphrase, session.SubAccount)
|
||||||
} else {
|
} else {
|
||||||
exchange, err = cmdutil.NewExchangeWithEnvVarPrefix(exchangeName, session.EnvVarPrefix)
|
exchange, err = cmdutil.NewExchangeWithEnvVarPrefix(exchangeName, session.EnvVarPrefix)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user