Пример #1
0
        public static SynthOrderBook FromOrderBook(OrderBook orderBook, AssetPair target)
        {
            Debug.Assert(orderBook != null);
            Debug.Assert(target != null && target.IsValid());
            Debug.Assert(target.EqualOrInverted(orderBook.AssetPair));

            var result = new SynthOrderBook(target, new List <OrderBook> {
                orderBook
            });

            return(result);
        }
Пример #2
0
        public static SynthOrderBook FromOrderBooks(OrderBook first, OrderBook second, AssetPair target)
        {
            Debug.Assert(first != null);
            Debug.Assert(first.AssetPair != null && first.AssetPair.IsValid());
            Debug.Assert(second != null);
            Debug.Assert(second.AssetPair != null && second.AssetPair.IsValid());
            Debug.Assert(target != null && target.IsValid());

            var result = new SynthOrderBook(target, GetOrdered(new List <OrderBook> {
                first, second
            }, target));

            return(result);
        }