Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LowCmd = &cobra.Command{ Use: "low", Short: "Returns a ticker's percentage and dollar increase from a recent low", Example: " king-spy low aapl \n" + " king-spy low aapl -t=6M \n", Run: func(cmd *cobra.Command, args []string) { ticker := args[0] utils.TickerValidation(ticker) ticker = strings.ToLower(ticker) cmdArgs := os.Args[1] _, key, secret := config.Init() timeArg, _ := cmd.Flags().GetString("time") if timeArg != "1Y" && timeArg != "6M" && timeArg != "3M" && timeArg != "1M" { fmt.Println("") flagVal := color.YellowString("--time={timeframe}") fmt.Printf("Timeframe not recognized or not provided. Use the %v flag to provide a timeframe. \n", flagVal) fmt.Println("The recognized timeframes are: 3Y, 1Y, 6M, 3M, 1M") fmt.Println("Defaulting to 1Y timeframe") timeVal = "1Y" } else if timeArg == "12M" { timeVal = "1Y" } else { timeVal = timeArg } GetLow(key, secret, ticker, timeVal, cmdArgs) }, }
LowCmd represents the low command
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.