mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 16:55:15 +00:00
Merge pull request #245 from jnlin/fix/ftx-subaccount
This commit is contained in:
commit
345c3c9e2c
|
@ -105,10 +105,9 @@ func init() {
|
||||||
|
|
||||||
RootCmd.PersistentFlags().String("ftx-api-key", "", "ftx api key")
|
RootCmd.PersistentFlags().String("ftx-api-key", "", "ftx api key")
|
||||||
RootCmd.PersistentFlags().String("ftx-api-secret", "", "ftx api secret")
|
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() {
|
func Execute() {
|
||||||
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
|
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ func newExchange(session string) (types.Exchange, error) {
|
||||||
return ftx.NewExchange(
|
return ftx.NewExchange(
|
||||||
viper.GetString("ftx-api-key"),
|
viper.GetString("ftx-api-key"),
|
||||||
viper.GetString("ftx-api-secret"),
|
viper.GetString("ftx-api-secret"),
|
||||||
viper.GetString("ftx-subaccount-name"),
|
viper.GetString("ftx-subaccount"),
|
||||||
), nil
|
), nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user