public BinanceStats() { _lastMinutePrice = new PriceStatsMinute(); _pricesSeconds = new List <PriceStatsSecond>(); _priceMinutes = new Queue <PriceStatsMinute>(); _context = new MySqlContext(); // Initialize web socket cache (with automatic streaming). _webSocketCache = new SymbolStatisticsWebSocketCache(); // Handle error events. _webSocketCache.Error += (s, e) => { Console.WriteLine(e.Exception.Message); }; }
public void SubscribeSymbols() { webSocketCache = new SymbolStatisticsWebSocketCache(); //webSocketCache.Error += WebSocketCache_Error; webSocketCache.Subscribe(ReceivedSymbol, new string[] { Symbol }); }