Merge pull request #245 from jnlin/fix/ftx-subaccount

This commit is contained in:
Yo-An Lin 2021-05-17 16:34:05 +08:00 committed by GitHub
commit 345c3c9e2c
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
}