示例#1
0
 public void SetAvailableCoins(IList <ProxyCoinInfoData> coins)
 {
     foreach (var coinInfo in coins)
     {
         availableCoins.Add(DomainMapper.MapCoin(coinInfo));
     }
 }
示例#2
0
        public void UpdateTickers(List <ProxyCoinTickerData> tickers)
        {
            foreach (var ticker in tickers)
            {
                var coin = availableCoins.Get(ticker.Coin);

                coin?.Tick(DomainMapper.MapCoinTicker(ticker));
            }
        }
示例#3
0
        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));
                }
            }
        }