Example #1
0
        public async Task <Dictionary <string, List <string> > > ProcessAsync(DateTime date)
        {
            var stockPrices = await _stockPriceService.GetStockPricessByDateAsync(date);

            return(stockPrices
                   .GroupBy(s => s.Exchange)
                   .ToDictionary(g => g.Key, g => g.Where(x => x.DailyGain == g.OrderByDescending(y => y.DailyGain).First().DailyGain).Select(z => z.Symbol).ToList()));
        }