private void OnInboundApplicationMsg(Object sender, InboundApplicationMsgEventArgs e) { List <Message> replies = new List <Message>(); switch (e.Msg.Type) { case MsgType.NewOrderSingle: Random rnd = new Random(); int x = rnd.Next(1, 5); switch (x) { case 1: replies.Add(CreateExecutionReport(e.Msg, OrdStatus.New)); break; case 2: replies.Add(CreateExecutionReport(e.Msg, OrdStatus.New)); replies.Add(CreateExecutionReport(e.Msg, OrdStatus.Partial)); break; case 3: replies.Add(CreateExecutionReport(e.Msg, OrdStatus.New)); replies.Add(CreateExecutionReport(e.Msg, OrdStatus.Filled)); break; case 4: replies.Add(CreateExecutionReport(e.Msg, OrdStatus.Rejected)); break; } break; case MsgType.OrderCancelRequest: replies.Add(CreateCancelledExecutionReport(e.Msg)); break; default: Message email = new Message(MsgType.Email, fixVersion); email[Tags.EmailThreadID] = "SellSide reply"; email[Tags.EmailType] = EmailType.New; email[Tags.Subject] = "Message was received"; email[Tags.EmailType] = EmailType.New; Group group = email.SetGroup(Tags.NoLinesOfText, 1); group.Set(Tags.Text, 0, "The message with MsgType=" + e.Msg[Tags.MsgType] + " was received"); replies.Add(email); break; } Session sn = (Session)sender; foreach (Message reply in replies) { reply.Validate(); sn.Send(reply); } }
static void InboundApplicationMsgEvent(object sender, InboundApplicationMsgEventArgs args) { if (!active) { return; } TimestampHelper.GetTicks(ref marks[counter].RecvFinish); ++counter; ready.Set(); }
private void marketDataSession_InboundApplicationMsgEvent(object sender, InboundApplicationMsgEventArgs args) { eventView.LogIncomingMessage(args.Msg); if (MsgType.Market_Data_Request == args.Msg.Type) { marketDataFeed.ProcessMarketDataRequest(args.Msg); } if (MsgType.Security_Definition_Request == args.Msg.Type) { marketDataFeed.ProcessSecurityDefinitionRequest(args.Msg); } }
static void InboundApplicationMsgEvent(object sender, InboundApplicationMsgEventArgs args) { ++counter; if (counter == WarmupNumberOfMessages) { receiveStart = TimestampHelper.Ticks; return; } if (counter == WarmupNumberOfMessages + NumberOfMessages) { receiveFinish = TimestampHelper.Ticks; ready.Set(); return; } }
protected void OnInboundApplicationMsg(Object sender, InboundApplicationMsgEventArgs args) { Message incomingMessage = args.Msg; switch (incomingMessage.Type) { case MsgType.Market_Data_Incremental_Refresh: ProcessMarketDataIncrementalRefresh(incomingMessage); break; case MsgType.Market_Data_Snapshot_Full_Refresh: ProcessMarketDataFullRefresh(incomingMessage); break; case MsgType.Security_Definition: ProcessSecurityDefinition(incomingMessage); break; } }
private void session_InboundApplicationMsgEvent(object sender, InboundApplicationMsgEventArgs args) { try { if (MsgType.Execution_Report != args.Msg.Type) { return; } Order order = orderBook.UpdateOrder(args.Msg); if (null != order) { OrderStateChanged(this, new OrderStateChangedArgs(order)); } } catch (Exception ex) { logger.LogError("Exception during the processing of incoming FIX message: " + ex); Trace.TraceError("Exception during the processing of incoming FIX message: " + ex); } }
private void OnInboundApplicationMsg(Object sender, InboundApplicationMsgEventArgs e) { _logger.Add("Incoming application-level message: " + e.Msg); }
private static void OnInboundApplicationMsg(Object sender, InboundApplicationMsgEventArgs e) { Console.WriteLine("Incoming application-level message:\n" + e.Msg); // Processing of the application-level incoming message ... }
void acceptor_InboundApplicationMsgEvent(object sender, InboundApplicationMsgEventArgs args) { Console.WriteLine("\nAcceptor received " + args.Msg.ToString(Message.StringFormat.TAG_NAME, '|')); inboundApplicationMessageEvent.Set(); }
void session_InboundApplicationMsgEvent(object sender, InboundApplicationMsgEventArgs args) { eventView.LogIncomingMessage(args.Msg); }
private void tradingSession_InboundApplicationMsgEvent(object sender, InboundApplicationMsgEventArgs args) { eventView.LogIncomingMessage(args.Msg); exchange.ProcessIncomingMessage(args.Msg); }