remove config flag constraint

This commit is contained in:
c9s 2022-03-16 13:52:46 +08:00
parent 553fe3abf9
commit ed94b8a8d8
3 changed files with 3 additions and 6 deletions

View File

@ -21,7 +21,6 @@ var balancesCmd = &cobra.Command{
Short: "Show user account balances",
SilenceUsage: true,
PreRunE: cobraInitRequired([]string{
"config",
"session",
}),
RunE: func(cmd *cobra.Command, args []string) error {

View File

@ -5,11 +5,12 @@ import (
"fmt"
"syscall"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/c9s/bbgo/pkg/bbgo"
"github.com/c9s/bbgo/pkg/cmd/cmdutil"
"github.com/c9s/bbgo/pkg/types"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
// go run ./cmd/bbgo kline --exchange=ftx --symbol=BTCUSDT
@ -17,7 +18,6 @@ var klineCmd = &cobra.Command{
Use: "kline",
Short: "connect to the kline market data streaming service of an exchange",
PreRunE: cobraInitRequired([]string{
"config",
"session",
"symbol",
"interval",

View File

@ -20,7 +20,6 @@ var tradesCmd = &cobra.Command{
Short: "Query trading history",
SilenceUsage: true,
PreRunE: cobraInitRequired([]string{
"config",
"session",
"symbol",
}),
@ -98,7 +97,6 @@ var tradeUpdateCmd = &cobra.Command{
Use: "tradeupdate --session=[exchange_name]",
Short: "Listen to trade update events",
PreRunE: cobraInitRequired([]string{
"config",
"session",
}),
RunE: func(cmd *cobra.Command, args []string) error {