コード例 #1
0
 public void TestQueryExchange()
 {
     _api.OnRspQryExchange += new TradeApi.RspQryExchange((ref CThostFtdcExchangeField pExchange, ref CThostFtdcRspInfoField pRspInfo,
                                                           int nRequestID, byte bIsLast) =>
     {
         if (pRspInfo.ErrorID == 0)
         {
             Console.WriteLine("交易所查询成功, ExchangeID: {0}", pExchange.ExchangeID);
         }
         else
         {
             Console.WriteLine(pRspInfo.ErrorMsg);
         }
         Assert.IsTrue(pRspInfo.ErrorID == 0);
     });
     _api.QueryExchange(1, "SHFE");
     Thread.Sleep(200);
 }