public override Task StopAsync(CancellationToken cancellationToken) { _logger.LogInformation($"Worker stopped at: {DateTime.Now}"); List <Product> products = new List <Product> { _exchangeService.Products.FirstOrDefault(x => x.BaseCurrency == "BTC" && x.QuoteCurrency == "EUR"), _exchangeService.Products.FirstOrDefault(x => x.BaseCurrency == "ETH" && x.QuoteCurrency == "EUR") }; products.RemoveAll(x => x == null); _exchangeService.ChangeFeed(products.ToUnSubscribeString()); _exchangeService.CloseFeed(); return(base.StopAsync(cancellationToken)); }