public void TestQueryPosition() { var queryPositionCallback = new DataListCallback <PositionInfo>((DataListResult <PositionInfo> result) => { if (result.IsSuccess) { foreach (PositionInfo positionInfo in result.Result) { Console.WriteLine("投资者持仓查询成功, InstrumentID: {0}", positionInfo.InstrumentID); } } Assert.IsTrue(result.IsSuccess); }); _adapter.QueryPosition(queryPositionCallback); Thread.Sleep(100); }
public void TestQueryPosition() { var queryPositionCallback = new DataListCallback <PositionInfo>((DataListResult <PositionInfo> result) => { if (result.IsSuccess) { Console.WriteLine("投资者持仓查询成功, 记录条数:{0}", result.Result.Count); } else { Console.WriteLine("投资者持仓查询失败:{0}", result.Error); } Assert.IsTrue(result.IsSuccess); }); _adapter.QueryPosition(queryPositionCallback); Thread.Sleep(100); }