From 56dffbf5148dc8034e2d9f04ab99419d4a074de3 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 23 Apr 2018 16:09:18 +0900 Subject: [PATCH] Set default exchange list --- .../HostedServices/RatesHostedService.cs | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/HostedServices/RatesHostedService.cs b/BTCPayServer/HostedServices/RatesHostedService.cs index 08fe47a4d..a826e948b 100644 --- a/BTCPayServer/HostedServices/RatesHostedService.cs +++ b/BTCPayServer/HostedServices/RatesHostedService.cs @@ -9,6 +9,8 @@ using BTCPayServer.Services.Rates; using Microsoft.Extensions.Hosting; using BTCPayServer.Logging; using System.Runtime.CompilerServices; +using System.IO; +using System.Text; namespace BTCPayServer.HostedServices { @@ -33,6 +35,58 @@ namespace BTCPayServer.HostedServices public Task StartAsync(CancellationToken cancellationToken) { + _coinAverageSettings.AvailableExchanges = new[] { + (DisplayName: "BitBargain", Name: "bitbargain"), + (DisplayName: "Tidex", Name: "tidex"), + (DisplayName: "LocalBitcoins", Name: "localbitcoins"), + (DisplayName: "EtherDelta", Name: "etherdelta"), + (DisplayName: "Kraken", Name: "kraken"), + (DisplayName: "BitBay", Name: "bitbay"), + (DisplayName: "Independent Reserve", Name: "independentreserve"), + (DisplayName: "Exmoney", Name: "exmoney"), + (DisplayName: "Bitcoin.co.id", Name: "bitcoin_co_id"), + (DisplayName: "Huobi", Name: "huobi"), + (DisplayName: "GDAX", Name: "gdax"), + (DisplayName: "Coincheck", Name: "coincheck"), + (DisplayName: "Bittylicious", Name: "bittylicious"), + (DisplayName: "Gemini", Name: "gemini"), + (DisplayName: "QuadrigaCX", Name: "quadrigacx"), + (DisplayName: "Bit2C", Name: "bit2c"), + (DisplayName: "Luno", Name: "luno"), + (DisplayName: "Negocie Coins", Name: "negociecoins"), + (DisplayName: "FYB-SE", Name: "fybse"), + (DisplayName: "Hitbtc", Name: "hitbtc"), + (DisplayName: "Bitex.la", Name: "bitex"), + (DisplayName: "Korbit", Name: "korbit"), + (DisplayName: "itBit", Name: "itbit"), + (DisplayName: "Okex", Name: "okex"), + (DisplayName: "Bitsquare", Name: "bitsquare"), + (DisplayName: "Bitfinex", Name: "bitfinex"), + (DisplayName: "CoinMate", Name: "coinmate"), + (DisplayName: "Bitstamp", Name: "bitstamp"), + (DisplayName: "Cryptonit", Name: "cryptonit"), + (DisplayName: "Foxbit", Name: "foxbit"), + (DisplayName: "QuickBitcoin", Name: "quickbitcoin"), + (DisplayName: "Poloniex", Name: "poloniex"), + (DisplayName: "Bit-Z", Name: "bitz"), + (DisplayName: "Liqui", Name: "liqui"), + (DisplayName: "BitKonan", Name: "bitkonan"), + (DisplayName: "Kucoin", Name: "kucoin"), + (DisplayName: "Binance", Name: "binance"), + (DisplayName: "Rock Trading", Name: "rocktrading"), + (DisplayName: "Mercado Bitcoin", Name: "mercado"), + (DisplayName: "Coinsecure", Name: "coinsecure"), + (DisplayName: "Coinfloor", Name: "coinfloor"), + (DisplayName: "bitFlyer", Name: "bitflyer"), + (DisplayName: "BTCTurk", Name: "btcturk"), + (DisplayName: "Bittrex", Name: "bittrex"), + (DisplayName: "CampBX", Name: "campbx"), + (DisplayName: "Zaif", Name: "zaif"), + (DisplayName: "FYB-SG", Name: "fybsg"), + (DisplayName: "Quoine", Name: "quoine"), + (DisplayName: "BTC Markets", Name: "btcmarkets"), + (DisplayName: "Bitso", Name: "bitso"), + }.ToArray(); _Tasks.Add(RefreshCoinAverageSupportedExchanges(_Cts.Token)); _Tasks.Add(RefreshCoinAverageSettings(_Cts.Token)); return Task.CompletedTask; @@ -72,7 +126,6 @@ namespace BTCPayServer.HostedServices .Exchanges .Select(c => (c.DisplayName, c.Name)) .ToArray(); - await Task.Delay(TimeSpan.FromHours(5), cancellation); }, cancellation); }