Exemple #1
0
        private void Execute()
        {
            var orderBooks      = _orderBooksService.GetFilteredByWallets();
            var lykkeArbitrages = GetArbitrages(orderBooks).ToList();

            RefreshArbitrages(lykkeArbitrages);

            // Publish event
            var allMarketMakers = new List <string>();

            foreach (var x in lykkeArbitrages)
            {
                allMarketMakers.AddRange(x.MarketMakers);
            }
            allMarketMakers = allMarketMakers.Distinct().ToList();
            if (allMarketMakers.Count == 0)
            {
                return;
            }
            var marketMakers = new MarketMakers {
                Names = allMarketMakers, Timestamp = DateTime.UtcNow
            };

            _marketMakersPublisher.Publish(marketMakers);
        }
        private void Execute()
        {
            var orderBooks      = _orderBooksService.GetFilteredByWallets();
            var lykkeArbitrages = GetArbitrages(orderBooks);

            RefreshArbitrages(lykkeArbitrages);
        }