public void FireOnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField pInstrumentMarginRate) { if (null != OnRspQryInstrumentMarginRate) { OnRspQryInstrumentMarginRate(pInstrumentMarginRate); } }
private void OnRspQryInstrumentMarginRate_callback(object sender, ref CThostFtdcInstrumentMarginRateField pInstrumentMarginRate, ref CThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { if (null != OnRspQryInstrumentMarginRate) { OnRspQryInstrumentMarginRate(this, new OnRspQryInstrumentMarginRateArgs(ref pInstrumentMarginRate, ref pRspInfo, nRequestID, bIsLast)); } }
public OnRspQryInstrumentMarginRateArgs(ref CThostFtdcInstrumentMarginRateField pInstrumentMarginRate, ref CThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { this.pInstrumentMarginRate = pInstrumentMarginRate; this.pRspInfo = pRspInfo; this.nRequestID = nRequestID; this.bIsLast = bIsLast; }
void OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField pInstrumentMarginRate) { Console.WriteLine("==保证金率"); Console.WriteLine(pInstrumentMarginRate.InstrumentID); Console.WriteLine(pInstrumentMarginRate.LongMarginRatioByMoney); Console.WriteLine(pInstrumentMarginRate.LongMarginRatioByVolume); Console.WriteLine(pInstrumentMarginRate.ShortMarginRatioByMoney); Console.WriteLine(pInstrumentMarginRate.ShortMarginRatioByVolume); }
private void OnRspQryInstrumentMarginRate(IntPtr pTraderApi, ref CThostFtdcInstrumentMarginRateField pInstrumentMarginRate, ref CThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { if (0 == pRspInfo.ErrorID) { _dictMarginRate[pInstrumentMarginRate.InstrumentID] = pInstrumentMarginRate; tdlog.Info("已经接收保证金率 {0}", pInstrumentMarginRate.InstrumentID); //通知单例 CTPAPI.GetInstance().FireOnRspQryInstrumentMarginRate(pInstrumentMarginRate); } else { tdlog.Error("nRequestID:{0},ErrorID:{1},OnRspQryInstrumentMarginRate:{2}", nRequestID, pRspInfo.ErrorID, pRspInfo.ErrorMsg); EmitError(nRequestID, pRspInfo.ErrorID, "OnRspQryInstrumentMarginRate:" + pRspInfo.ErrorMsg); } }
private void OnRspQryInstrumentMarginRate_3(ref CThostFtdcInstrumentMarginRateField pInstrumentMarginRate, ref CThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { OnRspQryInstrumentMarginRate_1(this, ref pInstrumentMarginRate, ref pRspInfo, nRequestID, bIsLast); }
private void OnRspQryInstrumentMarginRate_3(IntPtr pTraderApi, ref CThostFtdcInstrumentMarginRateField pInstrumentMarginRate, ref CThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { OnRspQryInstrumentMarginRate_1(this, pTraderApi, ref pInstrumentMarginRate, ref pRspInfo, nRequestID, bIsLast); }
private void OnRspQryInstrumentMarginRate_callback(IntPtr pTraderApi, ref CThostFtdcInstrumentMarginRateField pInstrumentMarginRate, ref CThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { if (null != OnRspQryInstrumentMarginRate) { OnRspQryInstrumentMarginRate(this, new OnRspQryInstrumentMarginRateArgs(pTraderApi, ref pInstrumentMarginRate, ref pRspInfo, nRequestID, bIsLast)); } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CThostFtdcInstrumentMarginRateField obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public void SetNativeValue(CThostFtdcInstrumentMarginRateField instrumentMarginRate) { this.instrumentMarginRate = instrumentMarginRate; this.isRefreshMarginRate = true; }
public override void OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField pInstrumentMarginRate, CThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { _callbackApi.OnRspQryInstrumentMarginRate(pInstrumentMarginRate, pRspInfo, nRequestID, bIsLast); }
public OnRspQryInstrumentMarginRateArgs(IntPtr pTraderApi, ref CThostFtdcInstrumentMarginRateField pInstrumentMarginRate, ref CThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { this.pTraderApi = pTraderApi; this.pInstrumentMarginRate = pInstrumentMarginRate; this.pRspInfo = pRspInfo; this.nRequestID = nRequestID; this.bIsLast = bIsLast; }
///请求查询合约保证金率响应 public void OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField pInstrumentMarginRate, CThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { Console.WriteLine("OnRspQryInstrumentMarginRate"); }