Esempio n. 1
0
        public async Task <IEnumerable <IMarketData> > Get24HMarketsAsync()
        {
            var records = (await _tableStorage.GetDataAsync(MarketDataEntity.GeneratePartition())).ToArray();

            foreach (var record in records)
            {
                if (record.Dt < DateTime.UtcNow.Subtract(TimeSpan.FromDays(1)))
                {
                    record.Volume = 0;
                }
            }

            return(records);
        }
Esempio n. 2
0
        public async Task <IEnumerable <IMarketData> > Get24HMarketsAsync()
        {
            var records = await _tableStorage.GetDataAsync(MarketDataEntity.GeneratePartition());

            return(records.Where(x => x.Dt > DateTime.UtcNow.Subtract(TimeSpan.FromDays(1))));
        }