예제 #1
0
        public DeepData Get(string contractName)
        {
            var contract = model.Contracts.Where(a => a.Name == contractName).FirstOrDefault();

            if (contract == null)
            {
                return(new DeepData());
            }
            if (!container.Orders.ContainsKey(contract.Code))
            {
                return(new DeepData());
            }

            var c = container.Orders[contract.Code];
            var r = new DeepData();
            var s = c.SellQueue.ToList();
            var b = c.BuyQueue.ToList();

            foreach (var v in s)
            {
                r.AddOrder(v);
            }
            foreach (var v in b)
            {
                r.AddOrder(v);
            }
            return(r);
        }
예제 #2
0
        public DeepData Get(string contractName)
        {
            var r = new DeepData();
            var s = container.SellOrders.ToList();
            var b = container.BuyOrders.ToList();

            foreach (var v in s)
            {
                r.AddOrder(v);
            }
            foreach (var v in b)
            {
                r.AddOrder(v);
            }
            return(r);
        }