public MarketDepthsManager(List <int> markets, List <double> precisions, AnalyticsOrderMap orders) { if (markets == null) { throw new ArgumentNullException(nameof(markets)); } if (orders == null) { throw new ArgumentNullException(nameof(orders)); } if (precisions == null) { throw new ArgumentNullException(nameof(precisions)); } if (precisions.Count < 1) { precisions = new List <double> { 1 } } ; var depths = new Dictionary <int, Dictionary <double, MarketDepth> >(); foreach (var market in markets) { depths.Add(market, new Dictionary <double, MarketDepth>()); foreach (var precision in precisions) { depths[market].Add(precision, new MarketDepth(market, precision, orders)); } } this.marketDepths = depths.ToImmutableDictionary(); }
public AnalyticsMarket(int asset, AnalyticsOrderMap orderMap) { Asset = asset; Asks = new AnalyticsOrderbook(orderMap) { Side = OrderSide.Sell }; Bids = new AnalyticsOrderbook(orderMap) { Side = OrderSide.Buy }; }
public AnalyticsOrderbook(AnalyticsOrderMap orderMap) { this.orderMap = orderMap; }
public AnalyticsOrderbook(AnalyticsOrderMap orderMap, OrderSide side) { this.orderMap = orderMap; Side = side; comparer = new OrderInfoWrapperComparer(Side); }