internal SubscriptionMessage WithMarketFilter(MarketFilter marketFilter) { if (marketFilter != null) { MarketFilter = marketFilter; } return(this); }
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); }