public InstrumentParams GetUpdatedInstrumentParams(CGateAdapter.Messages.FutCommon.CgmCommon message) { var ip = GetUpdatedInstrumentParams(message.IsinId); if (ip == null) { return(null); } ip.BestOfferPrice = (decimal)message.BestSell; ip.BestBidPrice = (decimal)message.BestBuy; ip.BestOfferQuantity = message.AmountSell; ip.BestBidQuantity = message.AmountBuy; ip.LastPrice = (decimal)message.Price; //last // message.Amount;//last qty // message.deal_time;//last time // message.max_price;// // message.min_price; // message.open_price; if (string.IsNullOrEmpty(ip.Instrument.Code)) { return(null); } return(ip.Clone()); }
public override void Handle(CGateAdapter.Messages.FutCommon.CgmCommon message) { var code = instrumentResolver.GetShortIsinByIsinId(message.IsinId); if (string.IsNullOrEmpty(code)) { EnqueuePendingMessage(message); return; } var ip = instrumentParamsEmitter.GetUpdatedInstrumentParams(message); if (ip != null) { EnqueueTransportMessage(ip); } }