Example #1
0
 /// <summary>
 /// 查询LV1行情
 /// </summary>
 /// <param name="code"></param>
 public static void QueryLV1(String code)
 {
     if (EMSecurityService.KwItems.ContainsKey(code))
     {
         KwItem             item       = EMSecurityService.KwItems[code];
         int                innerCode  = item.Innercode;
         OneStockDetailData detailDate = new OneStockDetailData();
         detailDate.IsPush = true;
         detailDate.Code   = innerCode;
         detailDate.Start();
     }
 }
Example #2
0
        /// <summary>
        /// SubscribeData
        /// </summary>
        protected override void SubscribeData()
        {
            List <DataPacket> packets = new List <DataPacket>();

            foreach (int code in Codes)
            {
                OneStockDetailData oneStockDetailData = new OneStockDetailData();
                oneStockDetailData.Code          = code;
                oneStockDetailData.IsPush        = false;
                oneStockDetailData.DataReceived += new DataReceivedHandle(oneStockDetailData_DataReceived);

                ReqStockDetailLev2DataPacket packet = new ReqStockDetailLev2DataPacket();
                packet.Code = code;
                packets.Add(packet);
            }
            Cm.Request(packets);
        }