bbgo_origin/examples/kucoin/symbols.go

29 lines
489 B
Go
Raw Permalink Normal View History

2021-12-10 16:44:55 +00:00
package main
import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(symbolsCmd)
}
2021-12-10 16:44:55 +00:00
var symbolsCmd = &cobra.Command{
Use: "symbols",
// SilenceUsage is an option to silence usage when an error occurs.
SilenceUsage: true,
RunE: func(cmd *cobra.Command, args []string) error {
symbols, err := client.MarketDataService.ListSymbols(args...)
if err != nil {
return err
}
logrus.Infof("symbols: %+v", symbols)
return nil
},
}