public void SetAvailableCoins(IList <ProxyCoinInfoData> coins) { foreach (var coinInfo in coins) { availableCoins.Add(DomainMapper.MapCoin(coinInfo)); } }
public void UpdateTickers(List <ProxyCoinTickerData> tickers) { foreach (var ticker in tickers) { var coin = availableCoins.Get(ticker.Coin); coin?.Tick(DomainMapper.MapCoinTicker(ticker)); } }
public void SetTrades(string exchange, Dictionary <string, List <ProxyCoinOrderData> > trades) { var ts = user.UserTrades.GetOrAddEmpty(exchange); ts.Clear(); foreach (var trade in trades) { var userTrade = ts.GetOrAddEmpty(trade.Key); foreach (var item in trade.Value) { userTrade.Add(DomainMapper.MapTrade(item)); } } }