Ejemplo n.º 1
0
 public void TestQueryOrder()
 {
     _api.OnRspQryOrder += new TradeApi.RspQryOrder((ref CThostFtdcOrderField pOrder, ref CThostFtdcRspInfoField pRspInfo,
                                                     int nRequestID, byte bIsLast) =>
     {
         if (pRspInfo.ErrorID == 0)
         {
             Console.WriteLine("报单查询成功, OrderSysID: {0},FrontID: {1},SessionID: {2},OrderRef: {3},ExchangeID: {4},LimitPrice: {5}", pOrder.OrderSysID, pOrder.FrontID, pOrder.SessionID, pOrder.OrderRef, pOrder.ExchangeID, pOrder.LimitPrice);
         }
         else
         {
             Console.WriteLine(pRspInfo.ErrorMsg);
         }
         Assert.IsTrue(pRspInfo.ErrorID == 0);
     });
     _api.QueryOrder(1);
     Thread.Sleep(200);
 }