public void onMessage(quickfix.fix43.NewOrderSingle order, SessionID sessionID) throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue { try { validateOrder(order); OrderQty orderQty = order.getOrderQty(); Price price = getPrice(order); quickfix.fix43.ExecutionReport accept = new quickfix.fix43.ExecutionReport( genOrderID(), genExecID(), new ExecType(ExecType.FILL), new OrdStatus( OrdStatus.NEW), order.getSide(), new LeavesQty(order.getOrderQty() .getValue()), new CumQty(0), new AvgPx(0)); accept.set(order.getClOrdID()); accept.set(order.getSymbol()); sendMessage(sessionID, accept); if (isOrderExecutable(order, price)) { quickfix.fix43.ExecutionReport executionReport = new quickfix.fix43.ExecutionReport(genOrderID(), genExecID(), new ExecType(ExecType.FILL), new OrdStatus(OrdStatus.FILLED), order.getSide(), new LeavesQty(0), new CumQty(orderQty.getValue()), new AvgPx(price.getValue())); executionReport.set(order.getClOrdID()); executionReport.set(order.getSymbol()); executionReport.set(orderQty); executionReport.set(new LastQty(orderQty.getValue())); executionReport.set(new LastPx(price.getValue())); sendMessage(sessionID, executionReport); } } catch (RuntimeException e) { LogUtil.logThrowable(sessionID, e.getMessage(), e); } }