private void OnRspQryInvestorPosition(IntPtr pTraderApi, ref CZQThostFtdcInvestorPositionField pInvestorPosition, ref CZQThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { if (0 == pRspInfo.ErrorID) { _dbInMemInvestorPosition.InsertOrReplace( pInvestorPosition.InstrumentID, pInvestorPosition.PosiDirection, pInvestorPosition.HedgeFlag, pInvestorPosition.PositionDate, pInvestorPosition.Position, pInvestorPosition.LongFrozen, pInvestorPosition.ShortFrozen); timerPonstion.Enabled = false; timerPonstion.Enabled = true; } else EmitError(nRequestID, pRspInfo.ErrorID, "OnRspQryInvestorPosition:" + pRspInfo.ErrorMsg); }
public OnRspQryInvestorPositionArgs(IntPtr pTraderApi, ref CZQThostFtdcInvestorPositionField pInvestorPosition, ref CZQThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { this.pTraderApi = pTraderApi; this.pInvestorPosition = pInvestorPosition; this.pRspInfo = pRspInfo; this.nRequestID = nRequestID; this.bIsLast = bIsLast; }
//private void OnRspQryInstrumentMarginRate_callback(IntPtr pTraderApi, ref CZQThostFtdcInstrumentMarginRateField pInstrumentMarginRate, ref CZQThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) //{ // if (null != OnRspQryInstrumentMarginRate) // { // OnRspQryInstrumentMarginRate(this, new OnRspQryInstrumentMarginRateArgs(pTraderApi, ref pInstrumentMarginRate, ref pRspInfo, nRequestID, bIsLast)); // } //} private void OnRspQryInvestorPosition_callback(IntPtr pTraderApi, ref CZQThostFtdcInvestorPositionField pInvestorPosition, ref CZQThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { if (null != OnRspQryInvestorPosition) { OnRspQryInvestorPosition(this, new OnRspQryInvestorPositionArgs(pTraderApi, ref pInvestorPosition, ref pRspInfo, nRequestID, bIsLast)); } }