Beispiel #1
0
        public Lv1Quote ExecuteGetL1(string symbol)
        {
            var l1 = new Lv1Quote();

            try
            {
                l1 = api.GetL1(symbol);
            }
            catch (Exception e)
            {
                return(l1);
            }

            return(l1);
        }
Beispiel #2
0
        private Lv1Quote ExecuteGetL1()
        {
            var l1 = new Lv1Quote();

            try
            {
                l1 = api.GetL1(Symbol);
            }
            catch //(Exception e )
            {
                return(l1);
            }

            return(l1);
        }
Beispiel #3
0
        // Use this method when lots of call made to get level 1 quote
        public Lv1Quote ExecuteGetMassL1(string symbol)
        {
            var r  = new Random();
            var l1 = new Lv1Quote();

            for (int i = 0; i < 3; i++)
            {
                try
                {
                    l1 = api.GetL1(symbol);
                    return(l1);
                }
                catch (Exception e)
                {
                }
                Thread.Sleep(r.Next(200, 3000));
            }
            return(l1);
        }