Beispiel #1
0
        public static async Task MakeSimpleApiCall(Credentials creds)
        {
            using var client = new CoinbaseProClient(new Config
            {
                ApiKey     = creds.ApiKey,
                Secret     = creds.ApiSecret,
                Passphrase = creds.ApiPassphrase,
                ApiUrl     = "https://api-public.sandbox.pro.coinbase.com"
            });

            //Uncomment if you want to debug requests to Coinbase with Fiddler
            //See more here: https://github.com/bchavez/Coinbase/wiki/Debugging-with-Fiddler
            //Uncommenting the line below will only apply to the CoinbaseProClient; not the
            //websocket client.
            client.EnableFiddlerDebugProxy("http://localhost.:8888");

            var products = await client.MarketData.GetProductsAsync();

            var productIds = products.Select(p => p.Id).ToArray();

            WriteLine(">> Available Product IDs:");
            foreach (var productId in productIds)
            {
                WriteLine($">>  {productId}");
            }

            var data = await client.MarketData.GetStatsAsync("BTC-USD");

            WriteLine($">> BTC-USD Volume: {data.Volume}");
        }
Beispiel #2
0
        public async Task <IEnumerable <AccountBalance> > ReadAccountBalances()
        {
            var result = new List <AccountBalance>();

            try
            {
                using (var client = new CoinbaseProClient(config.GetConfig()))
                {
                    var getAllAccounts = await client.Accounts.GetAllAccountsAsync();

                    foreach (var a in getAllAccounts)
                    {
                        result.Add(new AccountBalance()
                        {
                            Currency  = a.Currency,
                            Balance   = a.Balance,
                            Available = a.Available,
                            Hold      = a.Hold
                        });
                    }
                }
            }
            catch (Exception exc)
            {
                // logger.Error(exc, exc.Message);
                Console.WriteLine(exc);
            }

            return(result);
        }
        public CoinbaseWebSocketService(IHubContext <TickerHub> hubContext)
        {
            _hubContext = hubContext;
            //create the CoinbasePro client without an authenticator
            Client = new CoinbaseProClient();

            //use the websocket feed
            ProductTypes = new List <ProductType>()
            {
                ProductType.BtcUsd
            };
            ChannelTypes = new List <ChannelType>()
            {
                ChannelType.Ticker
            };

            connectionCheckTimer = new Timer(
                callback: new TimerCallback(CheckConnection),
                state: null,
                dueTime: 3000,
                period: 3000);

            // EventHandler for the heartbeat response type
            Client.WebSocket.OnTickerReceived += WebSocket_OnTickerReceived;
        }
        protected override async Task GetExchangeDataAsync(CancellationToken ct)
        {
            var closed = false;

            Client = new CoinbaseProClient( );

            Client.WebSocket.OnWebSocketError += (sender,
                                                  args) =>
            {
            };
            Client.WebSocket.OnErrorReceived += (sender,
                                                 args) =>
            {
                Logger.Error(args.LastOrder.Reason);
                closed = true;
            };

            StartWebSocket( );

            while (Client.WebSocket.State != WebSocketState.Closed)
            {
                if (UpTime > LastUpdateDuration &&
                    LastUpdateDuration > TimeSpan.FromHours(1) ||
                    closed)
                {
                    Client.WebSocket.Stop( );
                    break;
                }

                await Task.Delay(PollingRate, ct).ConfigureAwait(false);
            }
        }
        // constructor
        public Client(List <string> cryptocurrencies)
        {
            // builds the pricelist using a list of cryprocurrency market strings
            foreach (string cryptocurrency in cryptocurrencies)
            {
                CryptocurrencyData newCryptocurrencyData = new CryptocurrencyData(cryptocurrency);
                priceList.Add(newCryptocurrencyData);
            }

            // add the ticker channel to the channel list
            theChanelTypes = new List <ChannelType>()
            {
                ChannelType.Ticker
            };

            theProductTypes = parseProducts(cryptocurrencies);

            theCoinBaseProClient = new CoinbasePro.CoinbaseProClient();

            theWebSocket = theCoinBaseProClient.WebSocket;


            theWebSocket.Start(theProductTypes, theChanelTypes);

            // event handler for ticker received
            theWebSocket.OnTickerReceived += WebSocket_OnTickerReceived;
        }
    public async Task <IList <Account> > GetAccounts()
    {
        var coinbaseProClient = new CoinbaseProClient(_authenticator);

        var accounts = await coinbaseProClient.AccountsService.GetAllAccountsAsync();

        return(accounts.ToList());
    }
        public CoinBaseService(string apiKey, string unsignedSignature, string passphrase, bool useSendBox = false)
        {
            _context = new CoinBaseContext();
            var authenticator = new Authenticator(apiKey, unsignedSignature, passphrase);

            //_client = new CoinbaseProClient();
            _client = new CoinbaseProClient(authenticator, useSendBox);
            _client.WebSocket.OnTickerReceived += WebSocket_OnTickerReceived;
        }
 internal Pair(CoinbaseProClient coinbaseProClient, string idCrypto, string idFiat, ProductType productType)
 {
     this.coinbaseProClient = coinbaseProClient;
     this.IdCrypto          = idCrypto;
     this.IdFiat            = idFiat;
     this.TypeProduit       = productType;
     NomCrypto = productType.BaseCurrency();
     NomFiat   = productType.QuoteCurrency();
 }
Beispiel #9
0
        public async Task can_get_products2()
        {
            var client = new CoinbaseProClient();

            server.RespondWith(Examples.ProductsJson2);

            var p = await client.MarketData.GetProductsAsync();

            p.Count.Should().NotBe(0);
        }
Beispiel #10
0
        public async Task can_deser_null_usdvolume()
        {
            var client = new CoinbaseProClient();

            server.RespondWithPagedResult(Json, 11, 33);

            var f = await client.Fills.GetFillsByProductIdAsync("ETH-BTC");

            f.Data.Count.Should().Be(2);
        }
Beispiel #11
0
    async Task CreateOrder(CoinbaseProClient client)
    {
        #region createOrder

        var order = await client.Orders.PlaceLimitOrderAsync(
            OrderSide.Buy, "ETH-USD", size : 2, limitPrice : 100m);

        order.Dump();

        #endregion
    }
Beispiel #12
0
 public void BeforeEachTest()
 {
     client = new CoinbaseProClient(new Config
     {
         UseTimeApi = true,
         ApiKey     = this.secrets.ApiKey,
         Secret     = this.secrets.ApiSecret,
         Passphrase = this.secrets.ApiPassphrase,
         ApiUrl     = "https://api-public.sandbox.pro.coinbase.com"
     });
 }
Beispiel #13
0
        public override void BeforeEachTest()
        {
            base.BeforeEachTest();

            client = new CoinbaseProClient(new Config
            {
                ApiKey     = apiKey,
                Secret     = apiSecret,
                Passphrase = apiPassprhase,
                UseTimeApi = false
            });
        }
Beispiel #14
0
        public async Task can_get_products2()
        {
            var client = new CoinbaseProClient();

            server.RespondWithJsonTestFile();

            var p = await client.MarketData.GetProductsAsync();

            p.Count.Should().NotBe(0);

            await Verifier.Verify(p);
        }
Beispiel #15
0
    async Task EnumerateOlder(CoinbaseProClient client)
    {
        #region EnumerateOlder
        //Get the initial page, items 16 through 20
        var trades = await client.MarketData.GetTradesAsync("ETC-USD", limit : 5);

        //Get the next batch of older trades after the current page.
        while (trades.After is not null)
        {
            trades = await client.MarketData.GetTradesAsync("ETC-USD", limit : 5, after : trades.After);
        }
        #endregion
    }
Beispiel #16
0
        static async Task Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            var client = new CoinbaseProClient(new Config
            {
                ApiKey     = "foobar",
                Secret     = "sauce",
                Passphrase = "bailouts are bad"
            });

            var data = await client.MarketData.GetStatsAsync("ETH-USD");

            Console.WriteLine($"ETH-USD Volume: {data.Volume}");
        }
Beispiel #17
0
    async Task EnumerateNewer(CoinbaseProClient client)
    {
        #region EnumerateNewer
        //Get the initial page, items 16 through 20
        var trades = await client.MarketData.GetTradesAsync("ETC-USD", limit : 5);

        //Some time advances, trades execute.

        //Now, get the next batch of newer trades before the current page.
        while (trades.Before is not null)
        {
            trades = await client.MarketData.GetTradesAsync("ETC-USD", limit : 5, before : trades.Before);
        }
        #endregion
    }
Beispiel #18
0
    void CoinbaseProClient()
    {
        #region CoinbaseProClient

        var client = new CoinbaseProClient(new Config
        {
            ApiKey     = "my-api-key",
            Secret     = "my-api-secret",
            Passphrase = "my-api-passphrase",
            //Override the ApiUrl property to use Sandbox.
            //ApiUrl = "https://api-public.sandbox.pro.coinbase.com"
        });

        #endregion
    }
Beispiel #19
0
        public Trader()
        {
            path = System.IO.Directory.GetCurrentDirectory() + "\\database.db";

            tickers = new List <Ticker>();
            client  = new CoinbaseProClient();

            currencies = new List <ProductType>();
            currencies.Add(ProductType.BtcUsd);

            channels = new List <ChannelType>();

            anchorPoint = DateTime.UtcNow;

            windows = new List <Window>();
            windows.Add(new Window("100ms", new TimeSpan(100 * TimeSpan.TicksPerMillisecond)));
            windows.Add(new Window("500ms", new TimeSpan(500 * TimeSpan.TicksPerMillisecond)));
            windows.Add(new Window("1s", new TimeSpan(0, 0, 1)));
            windows.Add(new Window("2s", new TimeSpan(0, 0, 2)));
            windows.Add(new Window("5s", new TimeSpan(0, 0, 5)));
            windows.Add(new Window("10s", new TimeSpan(0, 0, 10)));
            windows.Add(new Window("20s", new TimeSpan(0, 0, 20)));
            windows.Add(new Window("30s", new TimeSpan(0, 0, 30)));
            windows.Add(new Window("1m", new TimeSpan(0, 1, 0)));
            windows.Add(new Window("2m", new TimeSpan(0, 2, 0)));
            windows.Add(new Window("5m", new TimeSpan(0, 5, 0)));
            windows.Add(new Window("10m", new TimeSpan(0, 10, 0)));
            windows.Add(new Window("20m", new TimeSpan(0, 20, 0)));
            windows.Add(new Window("30m", new TimeSpan(0, 30, 0)));
            windows.Add(new Window("1h", new TimeSpan(1, 0, 0)));
            windows.Add(new Window("2h", new TimeSpan(2, 0, 0)));
            windows.Add(new Window("3h", new TimeSpan(3, 0, 0)));
            windows.Add(new Window("6h", new TimeSpan(6, 0, 0)));
            windows.Add(new Window("12h", new TimeSpan(12, 0, 0)));
            windows.Add(new Window("1d", new TimeSpan(24, 0, 0)));

            ReadPoints();

            //client.WebSocket.OnHeartbeatReceived += WebSocket_OnHeartbeatReceived;
            client.WebSocket.OnTickerReceived += WebSocket_OnTickerReceived;

            isRunning = true;
            thread    = new Thread(new ThreadStart(ExecThread));
            thread.Start();

            client.WebSocket.Start(currencies, channels, 12000);
        }
Beispiel #20
0
        public async Task <IEnumerable <WeatherForecast> > Get()
        {
            var _Authenticator = new Authenticator("4fe22c33f8b65c2546bbace195b4b44d", "pkMkgG6kj79LRoV/Yix2sDqK0ZjjHtMvoAItpdOAdx1/+MzdYZ0U6TAKotEq6qoRZF/VigMex3eo0eWe1c5KEw==", "*Ab3l4rd0*");

            CoinbaseProClient clientSandbox = new CoinbaseProClient(_Authenticator, true);

            var market_1min = await clientSandbox.ProductsService.GetHistoricRatesAsync(
                CoinbasePro.Shared.Types.ProductType.BtcUsd, new DateTime(2020, 1, 1)
                , new DateTime(2021, 3, 11)
                , CoinbasePro.Services.Products.Types.CandleGranularity.Minutes5);

            market_1min = market_1min.Reverse().ToList();

            List <JsonCandle> _list = new List <JsonCandle>();

            foreach (var market_1min_item in market_1min)
            {
                _list.Add(
                    new JsonCandle
                {
                    Close  = (market_1min_item.Close.HasValue ? market_1min_item.Close.Value:0),
                    High   = (market_1min_item.High.HasValue ? market_1min_item.High.Value : 0),
                    Low    = (market_1min_item.Low.HasValue ? market_1min_item.Low.Value : 0),
                    Open   = (market_1min_item.Open.HasValue ? market_1min_item.Open.Value : 0),
                    Time   = market_1min_item.Time,
                    Volume = market_1min_item.Volume
                }
                    );
            }


            string market_1min_str = JsonConvert.SerializeObject(_list);

            string path = @"C:\Users\billy\source\repos\Stock.Indicators\EmaDemaTema\data\historical\BTC-USD-5min.json";

            System.IO.File.WriteAllText(path, market_1min_str);

            var rng = new Random();

            return(Enumerable.Range(1, 5).Select(index => new WeatherForecast
            {
                Date = DateTime.Now.AddDays(index),
                TemperatureC = rng.Next(-20, 55),
                Summary = Summaries[rng.Next(Summaries.Length)]
            })
                   .ToArray());
        }
Beispiel #21
0
    async Task ErrorHandling(CoinbaseProClient client)
    {
        #region ErrorHandling

        try
        {
            var order = await client.Orders.PlaceLimitOrderAsync(
                OrderSide.Buy, "BTCX-USDX", size : 1, limitPrice : 5000m);
        }
        catch (Exception ex)
        {
            var errorMsg = await ex.GetErrorMessageAsync();

            Console.WriteLine(errorMsg);
        }
        //OUTPUT: "Product not found"

        #endregion
    }
Beispiel #22
0
        static async Task Main(string[] args)
        {
            // Call non-static methods
            Program program = new Program();

            // Convert JSON to KEYS object
            using (StreamReader r = new StreamReader(@"E:\_BlueFoxDen\Programs\CryptoTradeBot\CryptoTradeBot\Keys.json"))
            {
                string json = r.ReadToEnd();
                Keys = JsonConvert.DeserializeObject <KEYS>(json);
            }

            // Create authenticator
            var authenticator = new Authenticator(Keys.apikey, Keys.apisecret, Keys.apiphrase);

            // Start coinbase client
            var coinbaseProClient = new CoinbaseProClient(authenticator);


            // Used to get IDs of profiles and get balances for debugging
            //var allAccounts = await coinbaseProClient.AccountsService.GetAllAccountsAsync();
            //foreach(var account in allAccounts)
            //Console.WriteLine(account.Id + " " + account.Currency + " " + account.Balance);


            // Main loop
            while (true)
            {
                try{
                    await program.MakeTrade(coinbaseProClient);
                } catch (Exception e)
                {
                    Console.WriteLine(e.ToString());
                }
                Thread.Sleep(interval);
            }
        }
Beispiel #23
0
 public new void BeforeEachTest()
 {
     client = new CoinbaseProClient(new Config {
         ApiKey = "key", Secret = "secret", Passphrase = "satoshi", UseTimeApi = false
     });
 }
Beispiel #24
0
 public override void BeforeEachTest()
 {
     base.BeforeEachTest();
     client = new CoinbaseProClient();
 }
Beispiel #25
0
        private async Task MakeTrade(CoinbaseProClient coinbaseProClient)
        {
            // Get percent differences and current prices of currencies
            var currentTickerBTC = await coinbaseProClient.ProductsService.GetProductTickerAsync(ProductType.BtcUsd);

            double currentPriceBTC = (double)currentTickerBTC.Price;
            var    percentDiffBTC  = (currentPriceBTC - lastOpPriceBTC) / lastOpPriceBTC * 100;

            var currentTickerETH = await coinbaseProClient.ProductsService.GetProductTickerAsync(ProductType.EthUsd);

            double currentPriceETH = (double)currentTickerETH.Price;
            var    percentDiffETH  = (currentPriceETH - lastOpPriceETH) / lastOpPriceETH * 100;

            // Check if next action is to buy
            if (isNextOperationBuy == true)
            {
                // TODO - Check both percent differences and pick the "better outcome" percent
                // Check if BTC percent difference is either greater than upward trend (spike upwards) or if percent difference is less than dip (negative number)
                if (percentDiffBTC >= UPWARD_TREND_THRESHOLD || percentDiffBTC <= DIP_THREHOLD)
                {
                    var USDAccount = await coinbaseProClient.AccountsService.GetAccountByIdAsync("a8a83415-dc6c-4327-bf84-b3eb9859d81d");

                    Console.WriteLine(Math.Round(USDAccount.Balance, 6));
                    await coinbaseProClient.OrdersService.PlaceMarketOrderAsync(CoinbasePro.Services.Orders.Types.OrderSide.Buy, ProductType.BtcUsd, Math.Truncate(10000000 * USDAccount.Balance) / 10000000, CoinbasePro.Services.Orders.Types.MarketOrderAmountType.Size);

                    lastOpPriceBTC = currentPriceBTC;
                    var BTCAccount = await coinbaseProClient.AccountsService.GetAccountByIdAsync("4fb67e84-e6e9-46fd-bac4-ea03dc242c61");

                    Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + "[Operation] = Buy\n[Price] = " + currentPriceBTC.ToString() + "\n[BTC Avaliable] = " + BTCAccount.Balance.ToString() + "\n[USD Avaliable] = " + USDAccount.Balance.ToString() + "\n[Percent Difference] = " + percentDiffBTC.ToString() + "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~");

                    isNextOperationBuy = false;
                    isCurrentBTC       = true;
                }
                // Check if ETH percent difference is either greater than upward trend (spike upwards) or if percent difference is less than dip (negative number)
                else if (percentDiffETH >= UPWARD_TREND_THRESHOLD || percentDiffETH <= DIP_THREHOLD)
                {
                    var USDAccount = await coinbaseProClient.AccountsService.GetAccountByIdAsync("a8a83415-dc6c-4327-bf84-b3eb9859d81d");

                    Console.WriteLine(Math.Round(USDAccount.Balance, 6));
                    await coinbaseProClient.OrdersService.PlaceMarketOrderAsync(CoinbasePro.Services.Orders.Types.OrderSide.Buy, ProductType.EthUsd, Math.Truncate(10000000 * USDAccount.Balance) / 10000000, CoinbasePro.Services.Orders.Types.MarketOrderAmountType.Size);

                    lastOpPriceETH = currentPriceETH;
                    var ETHAccount = await coinbaseProClient.AccountsService.GetAccountByIdAsync("da8129ff-84e3-4612-8ec7-40eeee6c55ad");

                    Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + "[Operation] = Buy\n[Price] = " + currentPriceETH.ToString() + "\n[ETH Avaliable] = " + ETHAccount.Balance.ToString() + "\n[USD Avaliable] = " + USDAccount.Balance.ToString() + "\n[Percent Difference] = " + percentDiffETH.ToString() + "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~");

                    isNextOperationBuy = false;
                    isCurrentBTC       = false;

                    //Console.WriteLine("[Percent Difference] = " + percentDiff.ToString() + " (No Action)");
                }
            }
            else if (isNextOperationBuy == false)
            {
                // If money is put into BTC...
                if (isCurrentBTC == true)
                {
                    // And if current BTC price is going up or going down drastically...
                    if (percentDiffBTC >= PROFIT_THRESHOLD || percentDiffBTC <= STOP_LOSS_THRESHOLD)
                    {
                        // Then sell
                        var BTCAccount = await coinbaseProClient.AccountsService.GetAccountByIdAsync("4fb67e84-e6e9-46fd-bac4-ea03dc242c61");

                        Console.WriteLine(Math.Round(BTCAccount.Balance, 6));
                        var trade = await coinbaseProClient.OrdersService.PlaceMarketOrderAsync(CoinbasePro.Services.Orders.Types.OrderSide.Sell, ProductType.BtcUsd, Math.Truncate(10000000 * BTCAccount.Balance) / 10000000, CoinbasePro.Services.Orders.Types.MarketOrderAmountType.Size);

                        lastOpPriceBTC = currentPriceBTC;
                        var USDAccount = await coinbaseProClient.AccountsService.GetAccountByIdAsync("a8a83415-dc6c-4327-bf84-b3eb9859d81d");

                        Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + "[Operation] = Sell\n[Price] = " + currentPriceBTC.ToString() + "\n[BTC Avaliable] = " + BTCAccount.Balance.ToString() + "\n[USD Avaliable] = " + USDAccount.Available.ToString() + "\n[Percent Difference] = " + percentDiffBTC.ToString() + "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~");

                        isNextOperationBuy = true;
                    }
                }
                // Else if money is put into ETH...
                else if (isCurrentBTC == false)
                {
                    // And if current ETH price is going up or going down drastically...
                    if (percentDiffETH >= PROFIT_THRESHOLD || percentDiffETH <= STOP_LOSS_THRESHOLD)
                    {
                        // Then sell
                        var ETHAccount = await coinbaseProClient.AccountsService.GetAccountByIdAsync("da8129ff-84e3-4612-8ec7-40eeee6c55ad");

                        Console.WriteLine(Math.Round(ETHAccount.Balance, 6));
                        var trade = await coinbaseProClient.OrdersService.PlaceMarketOrderAsync(CoinbasePro.Services.Orders.Types.OrderSide.Sell, ProductType.EthUsd, Math.Truncate(10000000 * ETHAccount.Balance) / 10000000, CoinbasePro.Services.Orders.Types.MarketOrderAmountType.Size);

                        lastOpPriceETH = currentPriceETH;
                        var USDAccount = await coinbaseProClient.AccountsService.GetAccountByIdAsync("a8a83415-dc6c-4327-bf84-b3eb9859d81d");

                        Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + "[Operation] = Sell\n[Price] = " + currentPriceETH.ToString() + "\n[ETH Avaliable] = " + ETHAccount.Balance.ToString() + "\n[USD Avaliable] = " + USDAccount.Available.ToString() + "\n[Percent Difference] = " + percentDiffETH.ToString() + "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~");

                        isNextOperationBuy = true;
                    }
                }

                //Console.WriteLine("[Percent Difference] = " + percentDiff.ToString() + " (No Action)");
            }
        }
        private static async Task Main(string[] args)
        {
            PrepareNLog();

            // File.Create(nomDuFichier).Close();

            var authenticator     = new CoinbasePro.Network.Authentication.Authenticator(apiKeySandbox, secretSandbox, passSandbox);
            var coinbaseProClient = new CoinbaseProClient(authenticator, sandBox: true);

            Pair pairBTCEUR = new Pair(coinbaseProClient, idBTCSandbox, idEURSandbox, ProductType.BtcEur);
            Pair pairETHEUR = new Pair(coinbaseProClient, idETHSandbox, idEURSandbox, ProductType.EthEur);
            Pair pairLTCEUR = new Pair(coinbaseProClient, idLTCSandbox, idEURSandbox, ProductType.LtcEur);

            IEnumerable <Account> accounts;

            accounts = await pairBTCEUR.ListerLesComptes();

            //Task.Run(async () =>
            //{
            //    await pair.ListerLesProduits();
            //}).GetAwaiter().GetResult();

            //Task.Run(async () =>
            //{
            //    await pair.ListerLesMonnaies();
            //}).GetAwaiter().GetResult();

            //Task.Run(async () =>
            //{
            //    await pair.DerniereCotation();
            //}).GetAwaiter().GetResult();

            Task.Run(async() =>
            {
                await pairBTCEUR.AvoirDuCompteCrypto();
            }).GetAwaiter().GetResult();

            Task.Run(async() =>
            {
                await pairBTCEUR.AvoirDuCompteFiat();
            }).GetAwaiter().GetResult();

            //Task.Run(async () =>
            //{
            //    await pair.MinimumMonnaies();
            //}).GetAwaiter().GetResult();

            //Task.Run(async () =>
            //{
            //    await pair.AnnulerTousOrdresOuverts();
            //}).GetAwaiter().GetResult();

            //AlgorithmeHaussierOrdreUnique alHETHEUR = new AlgorithmeHaussierOrdreUnique(pairETHEUR, 1000, 0.05m, 1.5m, ++nombreAlgos);
            //await alHETHEUR.Initialiser();
            //alHETHEUR.Lancer();

            //AlgorithmeHaussierOrdreUnique alHLTCEUR = new AlgorithmeHaussierOrdreUnique(pairLTCEUR, 1000, 0.05m, 1.5m, ++nombreAlgos);
            //await alHLTCEUR.Initialiser();
            //alHLTCEUR.Lancer();

            AlgorithmeHaussierOrdreUnique alHBTCEUR = new AlgorithmeHaussierOrdreUnique(pairBTCEUR, 3500, 0.05m, 1.5m, ++nombreAlgos);
            await alHBTCEUR.Initialiser();

            alHBTCEUR.Lancer();

            Console.ReadKey();
        }
 public CoinbaseProProxy(ApiInformation apiInformation)
 {
     coinbasePro = new CoinbaseProClient(apiInformation.ApiKey, apiInformation.ApiSecret, apiInformation.ApiExtra);
     this.SetPairs(GetMarkets().ToArray());
 }