trade

package
v2.0.0-...-b3d4e52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetCmd = &cobra.Command{
	Use:   "get",
	Short: "Get trade details",
	Run: func(cmd *cobra.Command, args []string) {
		symbol, _ := cmd.Flags().GetString("symbol")
		order, err := trade.Get(symbol)
		if err != nil {
			fmt.Print(err)
		}
		utils.OPrint(order)
	},
}

listCmd represents the list command

View Source
var ListCmd = &cobra.Command{
	Use:   "list",
	Short: "List trades",
	Run: func(cmd *cobra.Command, args []string) {
		symbol, _ := cmd.Flags().GetString("symbol")
		prices, err := trade.List(context.Background(), symbol)
		if err != nil {
			fmt.Print(err)
		}
		utils.OPrint(prices)
	},
}

listCmd represents the list command

View Source
var TradeCmd = &cobra.Command{
	Use:   "trade",
	Short: "Trades operations",
	Run: func(cmd *cobra.Command, args []string) {
		cmd.Help()
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL