public void TestParkedOrderAction() { _api.OnRspParkedOrderAction += new TradeApi.RspParkedOrderAction((ref CThostFtdcParkedOrderActionField pParkedOrderAction, ref CThostFtdcRspInfoField pRspInfo, int nRequestID, byte bIsLast) => { if (pRspInfo.ErrorID == 0) { Console.WriteLine("预埋撤单录入成功, ParkedOrderActionID: {0}", pParkedOrderAction.ParkedOrderActionID); } else { Console.WriteLine(pRspInfo.ErrorMsg); } Assert.IsTrue(pRspInfo.ErrorID == 0); }); CThostFtdcParkedOrderActionField field = new CThostFtdcParkedOrderActionField(); field.BrokerID = _brokerID; field.InvestorID = _investorID; field.InstrumentID = "TF1809"; field.ActionFlag = TThostFtdcActionFlagType.Delete; field.FrontID = 1; field.SessionID = 574058695; field.OrderRef = "1"; field.ExchangeID = "CFFEX"; string OrderSysID = "132984"; field.OrderSysID = new string('\0', 21 - OrderSysID.Length) + OrderSysID; _api.ParkedOrderAction(1, field); Thread.Sleep(500); }