public override void onMessage(QuickFix43.NewOrderSingle order, SessionID sessionID) { Symbol symbol = new Symbol(); Side side = new Side(); OrdType ordType = new OrdType(); OrderQty orderQty = new OrderQty(); Price price = new Price(); ClOrdID clOrdID = new ClOrdID(); order.get(ordType); if (ordType.getValue() != OrdType.LIMIT) { throw new IncorrectTagValue(ordType.getField()); } order.get(symbol); order.get(side); order.get(orderQty); order.get(price); order.get(clOrdID); QuickFix43.ExecutionReport executionReport = new QuickFix43.ExecutionReport (genOrderID(), genExecID(), new ExecType(ExecType.FILL), new OrdStatus(OrdStatus.FILLED), side, new LeavesQty(0), new CumQty(orderQty.getValue()), new AvgPx(price.getValue())); executionReport.set(clOrdID); executionReport.set(symbol); executionReport.set(orderQty); executionReport.set(new LastQty(orderQty.getValue())); executionReport.set(new LastPx(price.getValue())); if (order.isSetAccount()) { executionReport.set(order.getAccount()); } try { Session.sendToTarget(executionReport, sessionID); } catch (SessionNotFound) {} }
public override void onMessage( QuickFix43.NewOrderSingle order, SessionID sessionID ) { Symbol symbol = new Symbol(); Side side = new Side(); OrdType ordType = new OrdType(); OrderQty orderQty = new OrderQty(); Price price = new Price(); ClOrdID clOrdID = new ClOrdID(); order.get( ordType ); if ( ordType.getValue() != OrdType.LIMIT ) throw new IncorrectTagValue( ordType.getField() ); order.get( symbol ); order.get( side ); order.get( orderQty ); order.get( price ); order.get( clOrdID ); QuickFix43.ExecutionReport executionReport = new QuickFix43.ExecutionReport ( genOrderID(), genExecID(), new ExecType ( ExecType.FILL ), new OrdStatus ( OrdStatus.FILLED ), side, new LeavesQty ( 0 ), new CumQty ( orderQty.getValue() ), new AvgPx ( price.getValue() ) ); executionReport.set( clOrdID ); executionReport.set( symbol ); executionReport.set( orderQty ); executionReport.set( new LastQty( orderQty.getValue() ) ); executionReport.set( new LastPx( price.getValue() ) ); if( order.isSetAccount() ) executionReport.set( order.getAccount() ); try { Session.sendToTarget( executionReport, sessionID ); } catch ( SessionNotFound ) {} }
public sealed override void onMessage(QuickFix43.ExecutionReport message, SessionID session) { Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString()); MsgExecutionReport(message, session); }
public override void onMessage(QuickFix43.ExecutionReport message, SessionID sessionID) { Logger.InfoFormat("Execution report (Sender = {0}, Target = {1})", sessionID.getSenderCompID(), sessionID.getTargetCompID()); }
public virtual void Send(FIXExecutionReport Report) { QuickFix43.ExecutionReport executionReport = new QuickFix43.ExecutionReport(new OrderID(Report.OrderID), new ExecID(Report.ExecID), new QuickFix.ExecType(Report.ExecType), new QuickFix.OrdStatus(Report.OrdStatus), new QuickFix.Side(Report.Side), new LeavesQty(Report.LeavesQty), new CumQty(Report.CumQty), new AvgPx(Report.AvgPx)); if (Report.ContainsField(198)) executionReport.set(new SecondaryOrderID(Report.SecondaryOrderID)); if (Report.ContainsField(11)) executionReport.set(new ClOrdID(Report.ClOrdID)); if (Report.ContainsField(41)) executionReport.set(new OrigClOrdID(Report.OrigClOrdID)); if (Report.ContainsField(66)) executionReport.set(new ListID(Report.ListID)); if (Report.ContainsField(19)) executionReport.set(new ExecRefID(Report.ExecRefID)); if (Report.ContainsField(103)) executionReport.set(new OrdRejReason(Report.OrdRejReason)); if (Report.ContainsField(378)) executionReport.set(new ExecRestatementReason(Report.ExecRestatementReason)); if (Report.ContainsField(1)) executionReport.set(new Account(Report.Account)); if (Report.ContainsField(65)) executionReport.set(new SymbolSfx(Report.SymbolSfx)); if (Report.ContainsField(48)) executionReport.set(new SecurityID(Report.SecurityID)); if (Report.ContainsField(167)) executionReport.set(new QuickFix.SecurityType(Report.SecurityType)); if (Report.ContainsField(200)) executionReport.set(new MaturityMonthYear(Report.MaturityMonthYear)); if (Report.ContainsField(202)) executionReport.set(new StrikePrice(Report.StrikePrice)); if (Report.ContainsField(206)) executionReport.set(new OptAttribute(Report.OptAttribute)); if (Report.ContainsField(231)) executionReport.set(new ContractMultiplier(Report.ContractMultiplier)); if (Report.ContainsField(223)) executionReport.set(new CouponRate(Report.CouponRate)); if (Report.ContainsField(207)) executionReport.set(new SecurityExchange(Report.SecurityExchange)); if (Report.ContainsField(106)) executionReport.set(new Issuer(Report.Issuer)); if (Report.ContainsField(348)) executionReport.set(new EncodedIssuerLen(Report.EncodedIssuerLen)); if (Report.ContainsField(349)) executionReport.set(new EncodedIssuer(Report.EncodedIssuer)); if (Report.ContainsField(107)) executionReport.set(new SecurityDesc(Report.SecurityDesc)); if (Report.ContainsField(350)) executionReport.set(new EncodedSecurityDescLen(Report.EncodedSecurityDescLen)); if (Report.ContainsField(351)) executionReport.set(new EncodedSecurityDesc(Report.EncodedSecurityDesc)); if (Report.ContainsField(38)) executionReport.set(new OrderQty(Report.OrderQty)); if (Report.ContainsField(152)) executionReport.set(new CashOrderQty(Report.CashOrderQty)); if (Report.ContainsField(40)) executionReport.set(new QuickFix.OrdType(Report.OrdType)); if (Report.ContainsField(44)) executionReport.set(new Price(Report.Price)); if (Report.ContainsField(99)) executionReport.set(new StopPx(Report.StopPx)); if (Report.ContainsField(388)) executionReport.set(new DiscretionInst(Report.DiscretionInst)); if (Report.ContainsField(15)) executionReport.set(new QuickFix.Currency(Report.Currency)); if (Report.ContainsField(376)) executionReport.set(new ComplianceID(Report.ComplianceID)); if (Report.ContainsField(59)) executionReport.set(new QuickFix.TimeInForce(Report.TimeInForce)); if (Report.ContainsField(168)) executionReport.set(new EffectiveTime(Report.EffectiveTime)); if (Report.ContainsField(126)) executionReport.set(new ExpireTime(Report.ExpireTime)); if (Report.ContainsField(18)) executionReport.set(new ExecInst(Report.ExecInst)); if (Report.ContainsField(31)) executionReport.set(new LastPx(Report.LastPx)); if (Report.ContainsField(194)) executionReport.set(new LastSpotRate(Report.LastSpotRate)); if (Report.ContainsField(195)) executionReport.set(new LastForwardPoints(Report.LastForwardPoints)); if (Report.ContainsField(30)) executionReport.set(new LastMkt(Report.LastMkt)); if (Report.ContainsField(336)) executionReport.set(new TradingSessionID(Report.TradingSessionID)); if (Report.ContainsField(29)) executionReport.set(new LastCapacity(Report.LastCapacity)); if (Report.ContainsField(424)) executionReport.set(new DayOrderQty(Report.DayOrderQty)); if (Report.ContainsField(425)) executionReport.set(new DayCumQty(Report.DayCumQty)); if (Report.ContainsField(426)) executionReport.set(new DayAvgPx(Report.DayAvgPx)); if (Report.ContainsField(427)) executionReport.set(new GTBookingInst(Report.GTBookingInst)); if (Report.ContainsField(60)) executionReport.set(new TransactTime(Report.TransactTime)); if (Report.ContainsField(13)) executionReport.set(new QuickFix.CommType(Report.CommType)); if (Report.ContainsField(381)) executionReport.set(new GrossTradeAmt(Report.GrossTradeAmt)); if (Report.ContainsField(119)) executionReport.set(new SettlCurrAmt(Report.SettlCurrAmt)); if (Report.ContainsField(120)) executionReport.set(new SettlCurrency(Report.SettlCurrency)); if (Report.ContainsField(21)) executionReport.set(new HandlInst(Report.HandlInst)); if (Report.ContainsField(110)) executionReport.set(new MinQty(Report.MinQty)); if (Report.ContainsField(111)) executionReport.set(new MaxFloor(Report.MaxFloor)); if (Report.ContainsField(210)) executionReport.set(new MaxShow(Report.MaxShow)); if (Report.ContainsField(58)) executionReport.set(new Text(Report.Text)); if (Report.ContainsField(354)) executionReport.set(new EncodedTextLen(Report.EncodedTextLen)); if (Report.ContainsField(355)) executionReport.set(new EncodedText(Report.EncodedText)); if (Report.ContainsField(192)) executionReport.set(new OrderQty2(Report.OrderQty2)); if (Report.ContainsField(442)) executionReport.set(new MultiLegReportingType(Report.MultiLegReportingType)); try { Session.sendToTarget((QuickFix.Message)executionReport, this.fSessionID); } catch (Exception ex) { Console.WriteLine(BeAEwTZGlZaeOmY5cm.J00weU3cM6(530) + ex.Message); } }