public void TestQueryCFMMCTradingAccountKey() { _api.OnRspQryCFMMCTradingAccountKey += new TradeApi.RspQryCFMMCTradingAccountKey((ref CThostFtdcCFMMCTradingAccountKeyField pCFMMCTradingAccountKey, ref CThostFtdcRspInfoField pRspInfo, int nRequestID, byte bIsLast) => { if (pRspInfo.ErrorID == 0) { Console.WriteLine("账户密钥查询成功, KeyID: {0}", pCFMMCTradingAccountKey.KeyID); } else { Console.WriteLine(pRspInfo.ErrorMsg); } Assert.IsTrue(pRspInfo.ErrorID == 0); }); _api.QueryCFMMCTradingAccountKey(1); Thread.Sleep(200); }