fix(ftxExchange): the env variable is "FTX_ACCOUNT"

This commit is contained in:
Jui-Nan Lin 2021-05-17 12:42:04 +08:00
parent 45e930a086
commit 2d5ae1dde3
2 changed files with 2 additions and 3 deletions

View File

@ -105,10 +105,9 @@ func init() {
RootCmd.PersistentFlags().String("ftx-api-key", "", "ftx api key")
RootCmd.PersistentFlags().String("ftx-api-secret", "", "ftx api secret")
RootCmd.PersistentFlags().String("ftx-subaccount-name", "", "subaccount name. Specify it if the credential is for subaccount.")
RootCmd.PersistentFlags().String("ftx-subaccount", "", "subaccount name. Specify it if the credential is for subaccount.")
}
func Execute() {
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))

View File

@ -21,7 +21,7 @@ func newExchange(session string) (types.Exchange, error) {
return ftx.NewExchange(
viper.GetString("ftx-api-key"),
viper.GetString("ftx-api-secret"),
viper.GetString("ftx-subaccount-name"),
viper.GetString("ftx-subaccount"),
), nil
}