示例#1
0
 public void TestQryDepthMarketData()
 {
     _api.OnRspQryDepthMarketData += new TradeApi.RspQryDepthMarketData((ref CThostFtdcDepthMarketDataField pDepthMarketData,
                                                                         ref CThostFtdcRspInfoField pRspInfo, int nRequestID, byte bIsLast) =>
     {
         if (pRspInfo.ErrorID == 0)
         {
             Console.WriteLine("行情查询成功, InstrumentID: {0}", pDepthMarketData.InstrumentID);
         }
         else
         {
             Console.WriteLine(pRspInfo.ErrorMsg);
         }
         Assert.IsTrue(pRspInfo.ErrorID == 0);
     });
     _api.QueryMarketData(1, "bu1712");
     Thread.Sleep(200);
 }