コード例 #1
0
        private async Task AddTickersToDbAsync()
        {
            var tickerList = await _tickerApi.ReadAllAsync(2);

            foreach (Ticker ticker in tickerList)
            {
                _marketCapDataInfosRepository.Add(ticker);
            }
        }
コード例 #2
0
        public async Task Task()
        {
            var symbols = configuration["Symbols"];

            var uri  = new Uri(BitfinexTickersEndpoint, string.Format("?symbols={0}", symbols));
            var data = await Requests.GET(uri);

            var tickers = BitfinexTickerParser.Parse(data);

            foreach (var ticker in tickers)
            {
                await tickerRepository.Add(ticker);
            }
        }