示例#1
0
        public void init()
        {
            logger.Info("init QuoteAdapter...");
            qc = new QuoteClass();
            logger.Info("quoteClass Initialized...");
            qc.OnData         += new _IQuoteEvents_OnDataEventHandler(OnData);
            qc.OnDisconnected += new _IQuoteEvents_OnDisconnectedEventHandler(OnDisconnected);
            connect();

            List <string> subList = SymbolManager.Instance.getSubSymbolList();

            if (subList != null)
            {
                foreach (string id in subList)
                {
                    qc.Subscribe(id);
                    logger.Info("QuoteCenter subscribe symbol " + id);
                }
            }
            else
            {
                logger.Info("subList is null");
            }


            //connectionCheck();
        }
示例#2
0
        public quoteCenter()
        {
            qc.OnData         += new _IQuoteEvents_OnDataEventHandler(OnData);
            qc.OnDisconnected += new _IQuoteEvents_OnDisconnectedEventHandler(OnDisconnected);

            connect();

            qc.Subscribe("CTP.CFFEX.IF.HOT");
            qc.Subscribe("CTP.SHFE.rb.HOT");
            qc.Subscribe("CTP.SHFE.cu.HOT");
            qc.Subscribe("CTP.SHFE.au.HOT");
            qc.Subscribe("CTP.SHFE.ru.HOT");
            qc.Subscribe("CTP.SHFE.zn.HOT");
            qc.Subscribe("CTP.SHFE.al.HOT");

            qc.Subscribe("CTP.CZCE.CF.HOT");
            qc.Subscribe("CTP.CZCE.ER.HOT");
            qc.Subscribe("CTP.CZCE.WS.HOT");
            qc.Subscribe("CTP.CZCE.RO.HOT");
            qc.Subscribe("CTP.CZCE.TA.HOT");
            qc.Subscribe("CTP.CZCE.SR.HOT");

            qc.Subscribe("CTP.DCE.y.HOT");
            qc.Subscribe("CTP.DCE.j.HOT");
            qc.Subscribe("CTP.DCE.l.HOT");
            qc.Subscribe("CTP.DCE.m.HOT");
            qc.Subscribe("CTP.DCE.p.HOT");
            qc.Subscribe("CTP.DCE.a.HOT");
            qc.Subscribe("CTP.DCE.c.HOT");
            qc.Subscribe("CTP.DCE.v.HOT");
        }