Beispiel #1
0
        //TODO: It is only pleaceholder

        public async Task <List <InstrumentPriceDto> > GetPriceOfAllInstrumentsAsync()
        {
            var priceList = new List <InstrumentPriceDto>();

            var api         = new ApiCaller();
            var instruments = await api.GetAllInstruments();

            foreach (var instrument in instruments)
            {
                priceList.Add(new InstrumentPriceDto {
                    Id = instrument.Id, Price = instrument.Id + 100, PriceDate = DateTime.UtcNow
                });
            }

            return(priceList);
        }
Beispiel #2
0
        //TODO: It is only pleaceholder
        public async Task <List <InstrumentPriceDto> > GetPriceOfAllInstruments()
        {
            var rnd       = new Random();
            var priceList = new List <InstrumentPriceDto>();

            var api         = new ApiCaller();
            var instruments = await api.GetAllInstruments();

            foreach (var instrument in instruments)
            {
                priceList.Add(new InstrumentPriceDto {
                    Id = instrument.Id, Price = (decimal)(rnd.Next(23, 89)), Volumen = instrument.Id * 1500, PriceDate = DateTime.UtcNow
                });
            }

            return(priceList);
        }