Esempio n. 1
0
        public AggregateBook(int depth, IEnumerable <AggregateBookLevel> bids, IEnumerable <AggregateBookLevel> asks)
        {
            Depth = depth;
            Bids  = new AggregateBookLevel[depth];
            Asks  = new AggregateBookLevel[depth];

            var b = bids.ToArray();
            var a = asks.ToArray();

            for (int i = 0; i < 10; i++)
            {
                if (i < b.Length)
                {
                    Bids[i] = b[i];
                }

                if (i < a.Length)
                {
                    Asks[i] = a[i];
                }
            }
        }
Esempio n. 2
0
 public AggregateBook(int depth)
 {
     Depth = depth;
     Bids  = new AggregateBookLevel[depth];
     Asks  = new AggregateBookLevel[depth];
 }