public async Task <decimal> GetConvertRateAsync(string currentCurrency, string newCurrency) { var baseUrl = _configuration.GetSection("CurrencyOption")["Url"]; var url = $@"{baseUrl}?base={currentCurrency}&symbols={newCurrency}"; var jsonResult = JObject.Parse(await _httpProvider.GetHttpContentAsync(url)); var jTokenRate = jsonResult["rates"][newCurrency]; var rate = (decimal)jTokenRate; return(rate); }