mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-24 15:55:14 +00:00
fix: remove requirements on config flag
This commit is contained in:
parent
522b84c6aa
commit
7e92f0f4e5
|
@ -24,9 +24,6 @@ var accountCmd = &cobra.Command{
|
|||
Use: "account [--session SESSION]",
|
||||
Short: "show user account details (ex: balance)",
|
||||
SilenceUsage: true,
|
||||
PreRunE: cobraInitRequired([]string{
|
||||
"config",
|
||||
}),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
ctx := context.Background()
|
||||
|
||||
|
|
|
@ -53,9 +53,6 @@ var BacktestCmd = &cobra.Command{
|
|||
Use: "backtest",
|
||||
Short: "backtest your strategies",
|
||||
SilenceUsage: true,
|
||||
PreRunE: cobraInitRequired([]string{
|
||||
"config",
|
||||
}),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
verboseCnt, err := cmd.Flags().GetCount("verbose")
|
||||
if err != nil {
|
||||
|
|
|
@ -34,7 +34,6 @@ var cancelOrderCmd = &cobra.Command{
|
|||
|
||||
// SilenceUsage is an option to silence usage when an error occurs.
|
||||
SilenceUsage: true,
|
||||
PreRunE: cobraInitRequired([]string{"config"}),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
|
|
@ -19,7 +19,6 @@ var orderbookCmd = &cobra.Command{
|
|||
Use: "orderbook --session=[exchange_name] --symbol=[pair_name]",
|
||||
Short: "connect to the order book market data streaming service of an exchange",
|
||||
PreRunE: cobraInitRequired([]string{
|
||||
"config",
|
||||
"session",
|
||||
"symbol",
|
||||
}),
|
||||
|
|
|
@ -24,7 +24,6 @@ var getOrderCmd = &cobra.Command{
|
|||
Short: "Get order status",
|
||||
SilenceUsage: true,
|
||||
PreRunE: cobraInitRequired([]string{
|
||||
"config",
|
||||
"order-id",
|
||||
"symbol",
|
||||
}),
|
||||
|
|
|
@ -40,9 +40,6 @@ var RunCmd = &cobra.Command{
|
|||
|
||||
// SilenceUsage is an option to silence usage when an error occurs.
|
||||
SilenceUsage: true,
|
||||
PreRunE: cobraInitRequired([]string{
|
||||
"config",
|
||||
}),
|
||||
RunE: run,
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ var userDataStreamCmd = &cobra.Command{
|
|||
Use: "userdatastream",
|
||||
Short: "Listen to session events (orderUpdate, tradeUpdate, balanceUpdate, balanceSnapshot)",
|
||||
PreRunE: cobraInitRequired([]string{
|
||||
"config",
|
||||
"session",
|
||||
}),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
|
|
Loading…
Reference in New Issue
Block a user