public override void OnRtnQuote(TapAPIQuoteWhole info) { DataManager.Quote.QuoteWholeMgr.UpdateQuote(info); if (null != OnQuoteUpdateEvent) { OnQuoteUpdateEvent(); } }
public override void OnRtnQuote(TapAPIQuoteWhole info) { //doubleArray temp = doubleArray.frompointer(info.QAskPrice); //double test=temp.getitem(0); //double test1 = temp.getitem(1); //double test2 = temp.getitem(2); //double test3 = temp.getitem(3); var bidPrice = new double[5]; info.GetQBidPrice(bidPrice, 5); Console.WriteLine($"更新时间:{info.DateTimeStamp},交易所:{info.Contract.Commodity.ExchangeNo},品种:{info.Contract.Commodity.CommodityNo},合约:{info.Contract.ContractNo1},最后价格:{info.QLastPrice},买1:{bidPrice[0]}"); }
public override void OnRtnQuote(TapAPIQuoteWhole info) { if (info != null) { Console.WriteLine("new quote: {0} {1} {2} {3} {4} {5}", info.DateTimeStamp, info.Contract.Commodity.ExchangeNo, info.Contract.Commodity.CommodityType, info.Contract.Commodity.CommodityNo, info.Contract.ContractNo1, info.QLastPrice); } }
public override void OnRtnQuote(TapAPIQuoteWhole info) { if (info != null) { var field = new CThostFtdcDepthMarketDataField() { TradingDay = "", InstrumentID = info.Contract.Commodity.CommodityNo + info.Contract.ContractNo1, ExchangeID = info.Contract.Commodity.ExchangeNo, ExchangeInstID = "", LastPrice = info.QLastPrice, Volume = (int)info.QLastQty }; _callbackApi.OnRtnDepthMarketData(field); } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TapAPIQuoteWhole obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public virtual void OnRtnQuote(TapAPIQuoteWhole info) { QTapQuoteApiPINVOKE.ITapQuoteAPINotify_OnRtnQuote(swigCPtr, TapAPIQuoteWhole.getCPtr(info)); }
public virtual void OnRspSubscribeQuote(uint sessionID, int errorCode, char isLast, TapAPIQuoteWhole info) { QTapQuoteApiPINVOKE.ITapQuoteAPINotify_OnRspSubscribeQuote(swigCPtr, sessionID, errorCode, isLast, TapAPIQuoteWhole.getCPtr(info)); }
public override void OnRspSubscribeQuote(uint sessionID, int errorCode, char isLast, TapAPIQuoteWhole info) { if (errorCode == 0) { Console.WriteLine("subscribe successfully."); Console.WriteLine("{0} {1} {2} {3} {4} {5}", info.DateTimeStamp, info.Contract.Commodity.ExchangeNo, info.Contract.Commodity.CommodityType, info.Contract.Commodity.CommodityNo, info.Contract.ContractNo1, info.QLastPrice); } else { Console.WriteLine("subscribe failed. {0}", errorCode); } }
public override void OnRspSubscribeQuote(uint sessionID, int errorCode, char isLast, TapAPIQuoteWhole info) { var field = new CThostFtdcSpecificInstrumentField() { InstrumentID = info.Contract.Commodity.CommodityNo + info.Contract.ContractNo1 }; var rspInfoField = new CThostFtdcRspInfoField() { ErrorID = errorCode }; _callbackApi.OnRspSubMarketData(field, rspInfoField, 0, true); }
public override void OnRspSubscribeQuote(uint sessionID, int errorCode, char isLast, TapAPIQuoteWhole info) { if (errorCode == 0) { if (info != null) { Console.WriteLine($"OnRspSubscribeQuote errorCode:{errorCode}, ContractNo1:{info.Contract?.ContractNo1}"); //Console.WriteLine( // info.Contract.Commodity.ExchangeNo+" "+info.Contract.Commodity.CommodityNo + " " + info.Contract.StrikePrice1 // + " " + info.Q5DAvgQty // + " " + info.QOpeningPrice // + " " + info.QClosingPrice // + " " + info.QHighPrice // + " " + info.QLowPrice // ); } else { Console.WriteLine($"OnRspSubscribeQuote result isLast:{isLast}"); } } else { Console.WriteLine($"OnRspSubscribeQuote result sessionID:{sessionID} errorCode:{errorCode}"); } }
public override void OnRspSubscribeQuote(uint sessionID, int errorCode, char isLast, TapAPIQuoteWhole info) { if (TapQuote.TAPIERROR_SUCCEED == errorCode) { DataManager.Quote.QuoteWholeMgr.AddQuote(info); } if (TapQuote.APIYNFLAG_YES == isLast && null != OnQuoteUpdateEvent) { OnQuoteUpdateEvent(); } }
public override void OnRspSubscribeQuote(uint sessionID, int errorCode, char isLast, TapAPIQuoteWhole info) { if (errorCode == 0) { if (info != null) { Console.WriteLine(info.Contract.Commodity.ExchangeNo + " " + info.Contract.Commodity.CommodityNo + " " + info.Contract.StrikePrice1 + " " + info.Q5DAvgQty); } } }