Ejemplo n.º 1
0
 public void TestQueryInstrument()
 {
     _api.OnRspQryInstrument += new TradeApi.RspQryInstrument((ref CThostFtdcInstrumentField pInstrument,
                                                               ref CThostFtdcRspInfoField pRspInfo, int nRequestID, byte bIsLast) =>
     {
         if (pRspInfo.ErrorID == 0)
         {
             Console.WriteLine("合约查询成功, InstrumentID: {0}", pInstrument.InstrumentID);
         }
         else
         {
             Console.WriteLine(pRspInfo.ErrorMsg);
         }
         Assert.IsTrue(pRspInfo.ErrorID == 0);
     });
     _api.QueryInstrument(1, "bu1712");
     Thread.Sleep(200);
 }