示例#1
0
        /// <summary>
        /// Downloads all symbols from the exchanges and filters out the coins with enough 24hr Volume
        /// </summary>
        /// <returns></returns>
        private void FindCoinsWithEnoughVolume()
        {
            _symbols = new List <string>();
            var allSymbols = _api.GetSymbols();

            var allTickers = _api.GetTickers();

            // for each symbol
            foreach (var symbol in allSymbols)
            {
                if (!IsValidCurrency(symbol))
                {
                    // ignore, symbol has wrong currency
                    continue;
                }

                // check volume
                var ticker = allTickers.FirstOrDefault(e => e.Key == symbol).Value;
                if (ticker.Volume.ConvertedVolume < _settings.Min24HrVolume)
                {
                    // ignore since volume is to low
                    continue;
                }

                // add to list
                _symbols.Add(symbol);
            }
            _symbols = _symbols.OrderBy(e => e).ToList();
        }