Example #1
0
        public static void Main(string[] args)
        {
            TradeInsideTheSpreadBot loginClient = new TradeInsideTheSpreadBot(4012, 0.00001m);

            if (args.Length != 4)
            {
                Console.WriteLine("Usage: " + loginClient.GetType() + " <url> <username> <password> [CFD_DEMO|CFD_LIVE]");
                Environment.Exit(-1);
            }

            string      url         = args[0];
            string      username    = args[1];
            string      password    = args[2];
            ProductType productType = (ProductType)Enum.Parse(typeof(ProductType), args[3].ToUpper());

            LmaxApi lmaxApi = new LmaxApi(url);

            lmaxApi.Login(new LoginRequest(username, password, productType), loginClient.LoginCallback,
                          FailureCallback("log in"));
        }
        public static void Main(string[] args)
        {
            TradeInsideTheSpreadBot loginClient = new TradeInsideTheSpreadBot(4012, 0.00001m);
            if (args.Length != 4)
            {
                Console.WriteLine("Usage: " + loginClient.GetType() + " <url> <username> <password> [CFD_DEMO|CFD_LIVE]");
                Environment.Exit(-1);
            }

            string url = args[0];
            string username = args[1];
            string password = args[2];
            ProductType productType = (ProductType)Enum.Parse(typeof(ProductType), args[3].ToUpper());

            LmaxApi lmaxApi = new LmaxApi(url);

            lmaxApi.Login(new LoginRequest(username, password, productType), loginClient.LoginCallback,
                          FailureCallback("log in"));
        }