public static Data.SellPrices GetSellPrices() { WebClient webClient = new ApiWebClient(); string response = webClient.DownloadString(new Uri(GetApiUrl())); Data.SellPrices sellPrices = JsonConvert.DeserializeObject <Data.SellPrices>(response); return(sellPrices); }
public IEnumerable <ExchangeInformation> GetExchangeInformation() { ApiWebClient webClient = new ApiWebClient(); string response = webClient.DownloadFlakyString(new Uri(GetApiUrl())); Data.SellPrices sellPrices = JsonConvert.DeserializeObject <Data.SellPrices>(response); List <ExchangeInformation> results = new List <ExchangeInformation>(); results.Add(new ExchangeInformation() { SourceCurrency = "BTC", TargetCurrency = "USD", TargetSymbol = "$", ExchangeRate = sellPrices.Subtotal.Amount }); return(results); }