Use BitcoinAverage as default ExchangeRate provider
ADD
WalletWasabi/WebClients/BitcoinAverage/BitcoinAverageExchangeRateProvider.cs
+using System;
+using System.Collections.Generic;
+using System.Net.Http;
+using System.Threading.Tasks;
+using WalletWasabi.Backend.Models;
+using WalletWasabi.Interfaces;
+
+namespace WalletWasabi.WebClients.BitcoinAverage
+{
+ public class BitcoinAverageExchangeRateProvider : IExchangeRateProvider
+ {
+ private class BitcoinAverageExchangeRate
+ {
+ public decimal Price { get; set; }
+ }
+
+ public async Task<List<ExchangeRate>> GetExchangeRateAsync()
+ {
+ using (var httpClient = new HttpClient())
+ {
+ httpClient.BaseAddress = new Uri("https://apiv2.bitcoinaverage.com");
+ var response = await httpClient.GetAsync("/convert/global?from=BTC&to=USD&amount=1");
+ var rate = await response.Content.ReadAsJsonAsync<BitcoinAverageExchangeRate>();
+
+ var exchangeRates = new List<ExchangeRate>
+ {
+ new ExchangeRate { Rate = rate.Price, Ticker = "USD" },
+ };
+
+ return exchangeRates;
+ }
+ }
+ }
+}

MODIFY
WalletWasabi/WebClients/ExchangeRateProviders.cs
WalletWasabi/WebClients/ExchangeRateProviders.cs
@@ -5,6 +5,7 @@ using System.Threading.Tasks;
using WalletWasabi.Backend.Models;
using WalletWasabi.Interfaces;
using WalletWasabi.Logging;
+using WalletWasabi.WebClients.BitcoinAverage;
using WalletWasabi.WebClients.BlockchainInfo;
using WalletWasabi.WebClients.Coinbase;
using WalletWasabi.WebClients.Gemini;
@@ -16,6 +17,7 @@ namespace WalletWasabi.WebClients
public class ExchangeRateProvider : IExchangeRateProvider
{
private readonly IExchangeRateProvider[] ExchangeRateProviders = {
+ new BitcoinAverageExchangeRateProvider(),
new SmartBitExchangeRateProvider(new SmartBitClient(Network.Main, disposeHandler: true)),
new BlockchainInfoExchangeRateProvider(),
new CoinbaseExchangeRateProvider(),

Use BitcoinAverage as default ExchangeRate provider