Beispiel #1
0
        public static void GetChart(string symbol, string timeframe)
        {
            var provider = new IEXDataProvider();
            var chart    = provider.GetChartData(symbol, timeframe).Result;

            foreach (var d in chart)
            {
                Console.WriteLine(PrettyConsoleFormatter.FormatAsLine(d));
            }
        }
Beispiel #2
0
 private static void PrintQuotes(IEnumerable <Quote> quotes)
 {
     Console.WriteLine(PrettyConsoleFormatter.FormatQuoteHeaderLine());
     foreach (var quote in quotes)
     {
         if (quote.change.GetValueOrDefault() >= 0.0)
         {
             Console.ForegroundColor = ConsoleColor.Green;
         }
         else
         {
             Console.ForegroundColor = ConsoleColor.Red;
         }
         Console.WriteLine(PrettyConsoleFormatter.FormatAsLine(quote));
     }
     Console.ResetColor();
 }