Exemplo n.º 1
0
 public void TestQueryTradingAccount()
 {
     _api.OnRspQryTradingAccount += new TradeApi.RspQryTradingAccount((ref CThostFtdcTradingAccountField pTradingAccount,
                                                                       ref CThostFtdcRspInfoField pRspInfo, int nRequestID, byte bIsLast) =>
     {
         if (pRspInfo.ErrorID == 0)
         {
             Console.WriteLine("帐户资金查询成功, Available: {0}", pTradingAccount.Available);
         }
         else
         {
             Console.WriteLine(pRspInfo.ErrorMsg);
         }
         Assert.IsTrue(pRspInfo.ErrorID == 0);
     });
     _api.QueryTradingAccount(1);
     Thread.Sleep(200);
 }