示例#1
0
        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); };
        }
示例#2
0
 public void SubscribeSymbols()
 {
     webSocketCache = new SymbolStatisticsWebSocketCache();
     //webSocketCache.Error += WebSocketCache_Error;
     webSocketCache.Subscribe(ReceivedSymbol, new string[] { Symbol });
 }