Пример #1
0
 internal SubscriptionMessage WithMarketFilter(MarketFilter marketFilter)
 {
     if (marketFilter != null)
     {
         MarketFilter = marketFilter;
     }
     return(this);
 }
Пример #2
0
        public async Task Subscribe(MarketFilter marketFilter, MarketDataFilter dataFilter)
        {
            _requestId++;
            var subscriptionMessage = new SubscriptionMessage("marketSubscription", _requestId)
                                      .WithMarketFilter(marketFilter)
                                      .WithMarketDataFilter(dataFilter);
            await Writer.WriteLineAsync(subscriptionMessage.ToJson());

            _subscriptionMessages.Add(_requestId, subscriptionMessage);
        }