private static void Symbol_NewLevel2(Symbol symbol, Level2Quote level2, DOMQuote dom) { // Snapshot level2 update if (dom != null) { List <Level2Quote> bids = dom.Bids; List <Level2Quote> asks = dom.Asks; } // Incremental level2 update if (level2 != null) { QuotePriceType priceType = level2.PriceType; // Bid or Ask double price = level2.Price; double size = level2.Size; if (level2.Closed) { // If level is closed and should be deleted } } // Get market depth info from symbol var depthOfMarket = symbol.DepthOfMarket.GetDepthOfMarketAggregatedCollections(); }
public static String Level2QuoteToString(Level2Quote quote) { return(quote.Quantity + " @ " + quote.Price.ToString(Constants.FORMAT_PRICE)); }