Example #1
0
        public InstrumentParams GetInstrumentParams(Instrument instrument)
        {
            InstrumentData data   = instrumentResolver.GetCGateInstrumentData(instrument);
            var            isinId = instrumentResolver.GetIsinIdByShortIsin(data.Symbol ?? "");

            if (isinId == int.MinValue)
            {
                return(null);
            }

            return(GetInstrumentParams(isinId));
        }
        /// <summary>
        /// Возвращает актуальный стакан для инструмента
        /// </summary>
        public OrderBook GetOrderBook(Instrument instrument)
        {
            InstrumentData data   = instrumentResolver.GetCGateInstrumentData(instrument);
            var            isinId = instrumentResolver.GetIsinIdByShortIsin(data.Symbol ?? "");

            if (isinId == int.MinValue)
            {
                return(null);
            }

            OrderBook ob;

            orderBooks.TryGetValue(isinId, out ob);
            return(ob);
        }