Esempio n. 1
0
        public void TestQueryTrade()
        {
            var queryPositionCallback = new DataListCallback <TradeInfo>((DataListResult <TradeInfo> result) =>
            {
                if (result.IsSuccess)
                {
                    foreach (TradeInfo tradeInfo in result.Result)
                    {
                        Console.WriteLine("成交查询成功, TradeID: {0}", tradeInfo.TradeID);
                    }
                }
                Assert.IsTrue(result.IsSuccess);
            });

            _adapter.QueryTrade(queryPositionCallback);
            Thread.Sleep(100);
        }
Esempio n. 2
0
        public void TestQueryTrade()
        {
            var queryPositionCallback = new DataListCallback <TradeInfo>((DataListResult <TradeInfo> result) =>
            {
                if (result.IsSuccess)
                {
                    Console.WriteLine("成交查询成功,记录条数:{0}", result.Result.Count);
                }
                else
                {
                    Console.WriteLine("成交查询失败:{0}", result.Error);
                }
                Assert.IsTrue(result.IsSuccess);
            });

            _adapter.QueryTrade(queryPositionCallback);
            Thread.Sleep(100);
        }