/// <summary> /// 持仓查询应答 /// </summary> /// <param name="rsp"></param> /// <param name="islast"></param> void OnQueryHold(/*TEsHoldRspField*/ IntPtr rsp, bool islast) { if (rsp != IntPtr.Zero) { TEsHoldRspField data = PInvokeUtility.GetObjectFromIntPtr <TEsHoldRspField>(rsp); this.trader.holdList.Add(data); Trace.WriteLine(string.Format("【持仓查询应答】{0} : {1} {2}", data.Contract1, data.HoldPrice, data.HoldVol)); } if (islast == true) { EventProcessor.BeginInvoke(this.trader.QueryHoldResponse, this.trader, new EsunnyEventArgs <List <TEsHoldRspField> >(this.trader.holdList)); } }
/// <summary> /// 持仓变化应答 /// </summary> /// <param name="rsp"></param> void OnReturnHold(TEsHoldRspField rsp) { Trace.WriteLine(string.Format("【持仓变化应答】{0} : {1} {2}", rsp.Contract1, rsp.HoldPrice, rsp.HoldVol)); EventProcessor.BeginInvoke(this.trader.ReturnHoldResponse, this.trader, new EsunnyEventArgs <TEsHoldRspField>(rsp)); }
/// <summary> /// 持仓变化应答 /// </summary> /// <param name="rsp"></param> void OnReturnHold(TEsHoldRspField rsp) { Trace.WriteLine(string.Format("【持仓变化应答】{0} : {1} {2}", rsp.Contract1, rsp.HoldPrice, rsp.HoldVol)); EventProcessor.BeginInvoke(this.trader.ReturnHoldResponse,this.trader, new EsunnyEventArgs<TEsHoldRspField>(rsp)); }