protected void On24HourTickerRecv(string[] item) { string symbolName = item[2]; Ticker first = null; for (int i = 0; i < Tickers.Count; i++) { Ticker tt = Tickers[i]; if (tt.Name == symbolName) { first = tt; break; } } BinanceTicker t = (BinanceTicker)first; if (t == null) { throw new DllNotFoundException("binance symbol not found " + symbolName); } t.Change = FastValueConverter.Convert(item[4]); t.HighestBid = FastValueConverter.Convert(item[9]); t.LowestAsk = FastValueConverter.Convert(item[11]); t.Hr24High = FastValueConverter.Convert(item[14]); t.Hr24Low = FastValueConverter.Convert(item[15]); t.BaseVolume = FastValueConverter.Convert(item[16]); t.Volume = FastValueConverter.Convert(item[17]); t.UpdateTrailings(); lock (t) { RaiseTickerChanged(t); } }
protected void On24HourTickerRecv(string[] item) { string symbolName = item[2]; BinanceTicker t = (BinanceTicker)Tickers.FirstOrDefault(tt => tt.Name == symbolName); if (t == null) { throw new DllNotFoundException("binance symbol not found " + symbolName); } t.Change = FastValueConverter.Convert(item[4]); t.HighestBid = FastValueConverter.Convert(item[9]); t.LowestAsk = FastValueConverter.Convert(item[11]); t.Hr24High = FastValueConverter.Convert(item[14]); t.Hr24Low = FastValueConverter.Convert(item[15]); t.BaseVolume = FastValueConverter.Convert(item[16]); t.Volume = FastValueConverter.Convert(item[17]); t.UpdateTrailings(); lock (t) { RaiseTickerUpdate(t); } }