public void Run()
        {
            // Configure your credentials for IQConnect in user environment variable or app.config !!!
            // Check the documentation for more information.

            // Run IQConnect launcher
            IQFeedLauncher.Start();

            // Connect the LookupClient created from the constructor
            LookupClient.Connect();

            // Add 100 symbols to the concurrent queue
            foreach (var symbol in MarketData.GetSymbols().Skip(100).Take(200))
            {
                Symbols.Enqueue(symbol);
            }

            // Download data for all added symbols
            var sw = Stopwatch.StartNew();

            Start();
            sw.Stop();

            // Count the total of daily messages received
            var messagesFetched = 0;

            foreach (var dailyMessages in _dailyMessagesBySymbol)
            {
                messagesFetched += dailyMessages.Value.Count;
            }

            Console.WriteLine($"\nFetched {messagesFetched} Daily messages for {_dailyMessagesBySymbol.Count} stocks in {sw.Elapsed.TotalMilliseconds} ms.");
        }
Esempio n. 2
0
        public void Run()
        {
            // Configure your credentials for IQConnect in user environment variable or app.config !!!
            // Check the documentation for more information.

            // Run IQConnect launcher
            IQFeedLauncher.Start();

            // Connect the LookupClient created from the constructor
            LookupClient.Connect();

            // Add 100 symbols to the concurrent queue
            foreach (var symbol in MarketData.GetSymbols().Take(100))
            {
                Symbols.Enqueue(symbol);
            }

            // Create required directories for saving files
            CreateDirectories();

            // Download data for all added symbols
            Start();
        }