コード例 #1
0
        public PriceTarget()
        {
            CrypnosticConfig config = new CrypnosticConfig(
                ExchangeName.Binance,
                ExchangeName.Cryptopia,
                ExchangeName.Kucoin,
                ExchangeName.GDax);

            config.BlacklistCoins("Tether", "Bitcoin Cash");

            monitor = new CrypnosticController(config);
        }
コード例 #2
0
        public async Task Start()
        {
            CrypnosticConfig config = new CrypnosticConfig(
                ExchangeName.Binance,
                ExchangeName.Cryptopia,
                ExchangeName.Kucoin,
                //ExchangeName.AEX,
                ExchangeName.GDax,
                ExchangeName.Idex
                );


            IList <IList <object> > settingsBlacklist = await sheet.Read(settingsTab, "A:A");

            if (settingsBlacklist != null)
            {
                List <string> blacklist = new List <string>();
                foreach (var row in settingsBlacklist)
                {
                    object blacklistData = row.FirstOrDefault();
                    if (blacklistData == null)
                    {
                        continue;
                    }
                    blacklist.Add((string)blacklistData);
                }

                config.BlacklistCoins(blacklist.ToArray());
            }

            IList <IList <object> > settingsMinCap = await sheet.Read(settingsTab, "C2");

            if (settingsMinCap != null && settingsMinCap.Count > 0 && settingsMinCap[0].Count > 0)
            {
                minCap = decimal.Parse(settingsMinCap[0][0].ToString().RemoveCruftFromNumber());
            }

            exchangeMonitor = new CrypnosticController(config);
            await exchangeMonitor.Start();

            RefreshTimer_Elapsed(null, null);
        }