Esempio n. 1
0
 /// <summary>
 /// 批量撤单请求
 /// </summary>
 void ReqBulkCancelOrder()
 {
     ThostFtdcBulkCancelOrderField req = new ThostFtdcBulkCancelOrderField();
     req.BrokerID = BROKER_ID;
     req.InvestorID = INVESTOR_ID;
     req.OrderType = EnumOrderTypeType.Normal;
     req.nCount = 2;
     req.OrderKey_0 = new ThostOrderKeyField();
     req.OrderKey_0.ExchangeID = "CZCE";
     req.OrderKey_0.FrontID = 126187484;
     req.OrderKey_0.SessionID = 5463;
     req.OrderKey_0.OrderRef = "16385";
     req.OrderKey_1 = new ThostOrderKeyField();
     req.OrderKey_1.ExchangeID = "CZCE";
     req.OrderKey_1.FrontID = 126187484;
     req.OrderKey_1.SessionID = 5463;
     req.OrderKey_1.OrderRef = "32769";
     int iResult = api.ReqBulkCancelOrder(req, ++iRequestID);
     Console.WriteLine("--->>> 批量撤单: " + ((iResult == 0) ? "成功" : "失败"));
 }
Esempio n. 2
0
 /// <summary>
 /// 批量撤单应答
 /// </summary>
 /// <param name="pBulkCancelOrder"></param>
 /// <param name="pRspInfo"></param>
 /// <param name="nRequestID"></param>
 /// <param name="bIsLast"></param>
 void OnRspBulkCancelOrder(ThostFtdcBulkCancelOrderField pBulkCancelOrder, ThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast)
 {
     DebugPrintFunc(new StackTrace());
     if (bIsLast && !IsErrorRspInfo(pRspInfo))
     {
         //录出客户
         ReqUserLogout();
     }
 }