Пример #1
0
        static void Main(string[] args)
        {
            if (args.Length != 1)
            {
                System.Console.WriteLine("usage: TradeClient.exe CONFIG_FILENAME");
                System.Environment.Exit(2);
            }

            string file = args[0];

            try
            {
                QuickFix.SessionSettings           settings     = new QuickFix.SessionSettings(file);
                TradeClientApp                     application  = new TradeClientApp();
                QuickFix.MessageStoreFactory       storeFactory = new QuickFix.FileStoreFactory(settings);
                QuickFix.LogFactory                logFactory   = new QuickFix.ScreenLogFactory(settings);
                QuickFix.Transport.SocketInitiator initiator    = new QuickFix.Transport.SocketInitiator(application, storeFactory, settings, logFactory);
                initiator.Start();
                application.Run();
                initiator.Stop();
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
            Environment.Exit(1);
        }
Пример #2
0
        static void Main(string[] args)
        {
            if (args.Length != 1)
            {
                System.Console.WriteLine("usage: TradeClient.exe CONFIG_FILENAME");
                System.Environment.Exit(2);
            }

            string file = args[0];

            try
            {
                QuickFix.SessionSettings settings = new QuickFix.SessionSettings(file);
                TradeClientApp application = new TradeClientApp();
                QuickFix.MessageStoreFactory storeFactory = new QuickFix.FileStoreFactory(settings);
                QuickFix.LogFactory logFactory = new QuickFix.ScreenLogFactory(settings);
                QuickFix.Transport.SocketInitiator initiator = new QuickFix.Transport.SocketInitiator(application, storeFactory, settings, logFactory);
                initiator.Start();
                application.Run();
                initiator.Stop();
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
            Environment.Exit(1);
        }
Пример #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("=============");
            Console.WriteLine();
            Console.WriteLine("                                                    ! ! !");
            Console.WriteLine("              Test for NASDAQ UMS");
            Console.WriteLine("                                                    ! ! !");
            Console.WriteLine();
            Console.WriteLine("=============");

            string file = "./tradeclient.cfg";

            try
            {
                QuickFix.SessionSettings           settings     = new QuickFix.SessionSettings(file);
                TradeClientApp                     application  = new TradeClientApp();
                QuickFix.IMessageStoreFactory      storeFactory = new QuickFix.FileStoreFactory(settings);
                QuickFix.ILogFactory               logFactory   = new QuickFix.ScreenLogFactory(settings);
                QuickFix.Transport.SocketInitiator initiator    = new QuickFix.Transport.SocketInitiator(application, storeFactory, settings, logFactory);

                application.Initiator = initiator;

                initiator.Start();
                application.Run();
                initiator.Stop();
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
            Environment.Exit(1);
        }
Пример #4
0
        static void Main(string[] args)
        {
            Console.WriteLine("=============");
            Console.WriteLine("This is only an example program, meant to run against the Executor or SimpleAcceptor example programs.");
            Console.WriteLine();
            Console.WriteLine("                                                    ! ! !");
            Console.WriteLine("              DO NOT USE THIS ON A COMMERCIAL FIX INTERFACE!  It won't work and it's a bad idea!");
            Console.WriteLine("                                                    ! ! !");
            Console.WriteLine();
            Console.WriteLine("=============");

            if (args.Length != 1)
            {
                System.Console.WriteLine("usage: TradeClient.exe CONFIG_FILENAME");
                System.Environment.Exit(2);
            }

            string file = args[0];

            try
            {
                QuickFix.SessionSettings settings    = new QuickFix.SessionSettings(file);
                TradeClientApp           application = new TradeClientApp();

                QuickFix.IMessageStoreFactory storeFactory = new QuickFix.ODBCStoreFactory(settings);
                QuickFix.ILogFactory          logFactory   = new QuickFix.ScreenLogFactory(settings);

                //QuickFix.IMessageStoreFactory storeFactory = new QuickFix.FileStoreFactory(settings);
                //QuickFix.ILogFactory logFactory = new QuickFix.ScreenLogFactory(settings);


                QuickFix.Transport.SocketInitiator initiator = new QuickFix.Transport.SocketInitiator(application, storeFactory, settings, logFactory);

                // this is a developer-test kludge.  do not emulate.
                application.MyInitiator = initiator;

                initiator.Start();
                application.Run();
                initiator.Stop();
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
            Environment.Exit(1);
        }
Пример #5
0
        static void Main(string[] args)
        {
            Console.WriteLine("=============");
            Console.WriteLine("This is only an example program, meant to run against the Executor or SimpleAcceptor example programs.");
            Console.WriteLine();
            Console.WriteLine("                                                    ! ! !");
            Console.WriteLine("              DO NOT USE THIS ON A COMMERCIAL FIX INTERFACE!  It won't work and it's a bad idea!");
            Console.WriteLine("                                                    ! ! !");
            Console.WriteLine();
            Console.WriteLine("=============");

            if (args.Length != 1)
            {
                System.Console.WriteLine("usage: TradeClient.exe CONFIG_FILENAME");
                System.Environment.Exit(2);
            }

            string file = args[0];

            try
            {
                QuickFix.SessionSettings settings = new QuickFix.SessionSettings(file);
                TradeClientApp application = new TradeClientApp();
                QuickFix.IMessageStoreFactory storeFactory = new QuickFix.FileStoreFactory(settings);
                QuickFix.ILogFactory logFactory = new QuickFix.ScreenLogFactory(settings);
                QuickFix.Transport.SocketInitiator initiator = new QuickFix.Transport.SocketInitiator(application, storeFactory, settings, logFactory);

                // this is a developer-test kludge.  do not emulate.
                application.MyInitiator = initiator;

                initiator.Start();
                application.Run();
                initiator.Stop();
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
            Environment.Exit(1);
        }
Пример #6
0
        static void Main(string[] args)
        {
            try
            {
                QuickFix.SessionSettings           settings     = new QuickFix.SessionSettings("config_ssl.cfg");
                MarketDataApp                      application  = new MarketDataApp();
                QuickFix.IMessageStoreFactory      storeFactory = new QuickFix.FileStoreFactory(settings);
                QuickFix.ILogFactory               logFactory   = new QuickFix.ScreenLogFactory(settings);
                QuickFix.Transport.SocketInitiator initiator    = new QuickFix.Transport.SocketInitiator(application, storeFactory, settings, logFactory);
                initiator.Start();

                System.Threading.Thread.Sleep(TimeSpan.MaxValue);
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
                Console.ReadLine();
            }
            Environment.Exit(1);
        }
Пример #7
0
        static void Main(string[] args)
        {
            try
            {
                //OmsFix44Client application = new OmsFix44Client(new REST.V1.CoinApiRestClient("API_KEY"));
                OmsFix50Client application = new OmsFix50Client(new REST.V1.CoinApiRestClient("API_KEY"));

                QuickFix.SessionSettings           settings     = new QuickFix.SessionSettings("FixSettings.cfg");
                QuickFix.IMessageStoreFactory      storeFactory = new QuickFix.FileStoreFactory(settings);
                QuickFix.ILogFactory               logFactory   = new QuickFix.ScreenLogFactory(settings);
                QuickFix.Transport.SocketInitiator initiator    = new QuickFix.Transport.SocketInitiator(application, storeFactory, settings, logFactory);
                initiator.Start();

                System.Threading.Thread.Sleep(Int32.MaxValue);
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
                Console.ReadLine();
            }
            Environment.Exit(1);
        }