Exemplo n.º 1
0
        static async Task TestArbitration()
        {
            //await new ArbitrationPriceActionTracker().Begin();

            var priceTracker = PriceTracker.Current;
            await priceTracker.Initialize();

            while (true)
            {
                await Task.Delay(10000);

                var sw      = System.Diagnostics.Stopwatch.StartNew();
                var arbOpps = ArbitrationTracker.FindArbitrationOpportunities();
                sw.Stop();

                foreach (var arbOpp in arbOpps)
                {
                    Console.WriteLine(arbOpp);
                }
                Console.WriteLine($"Above calculations took {sw.ElapsedMilliseconds}ms to calculate");
                Console.WriteLine();
            }
        }