Examples of OrderStatusRequest


Examples of quickfix.fix42.OrderStatusRequest

            String replySessionID = "FIX.4.2:MARKET->TRADER";
            LOG.info("Given the requestSessionID '{}' calculated the replySessionID as '{}'", requestSessionID, replySessionID);

            String orderID = exchange.getIn().getHeader("orderID", String.class);

            OrderStatusRequest request = new OrderStatusRequest(new ClOrdID("XYZ"), new Symbol("GOOG"), new Side(Side.BUY));
            request.set(new OrderID(orderID));
            
            // Look for a reply execution report back to the requester session
            // and having the requested OrderID. This is a loose correlation but the best
            // we can do with FIX 4.2. Newer versions of FIX have an optional explicit correlation field.
            exchange.setProperty(QuickfixjProducer.CORRELATION_CRITERIA_KEY, new MessagePredicate(
                new SessionID(replySessionID), MsgType.EXECUTION_REPORT).withField(OrderID.FIELD, request.getString(OrderID.FIELD)));
           
            exchange.getIn().setBody(request);
        }
View Full Code Here

Examples of quickfix.fix42.OrderStatusRequest

    public static class OrderStatusRequestTransformer {
        public void transform(Exchange exchange) throws FieldNotFound {
            String sessionID = (String) exchange.getIn().getHeader("sessionID");
            String orderID = (String) exchange.getIn().getHeader("orderID");

            OrderStatusRequest request = new OrderStatusRequest(new ClOrdID("XYZ"), new Symbol("GOOG"), new Side(Side.BUY));
            request.set(new OrderID(orderID));
            
            // Look for a reply execution report back to the requester session
            // and having the requested OrderID. This is a loose correlation but the best
            // we can do with FIX 4.2. Newer versions of FIX have an optional explicit correlation field.
            exchange.setProperty(QuickfixjProducer.CORRELATION_CRITERIA_KEY, new MessagePredicate(
                new SessionID(sessionID), MsgType.EXECUTION_REPORT).withField(OrderID.FIELD, request.getString(OrderID.FIELD)));
           
            exchange.getIn().setBody(request);
        }
View Full Code Here

Examples of quickfix.fix42.OrderStatusRequest

    public static class OrderStatusRequestTransformer {
        public void transform(Exchange exchange) throws FieldNotFound {
            String sessionID = (String) exchange.getIn().getHeader("sessionID");
            String orderID = (String) exchange.getIn().getHeader("orderID");

            OrderStatusRequest request = new OrderStatusRequest(new ClOrdID("XYZ"), new Symbol("GOOG"), new Side(Side.BUY));
            request.set(new OrderID(orderID));
            
            // Look for a reply execution report back to the requester session
            // and having the requested OrderID. This is a loose correlation but the best
            // we can do with FIX 4.2. Newer versions of FIX have an optional explicit correlation field.
            exchange.setProperty(QuickfixjProducer.CORRELATION_CRITERIA_KEY, new MessagePredicate(
                new SessionID(sessionID), MsgType.EXECUTION_REPORT).withField(OrderID.FIELD, request.getString(OrderID.FIELD)));
           
            exchange.getIn().setBody(request);
        }
View Full Code Here

Examples of quickfix.fix42.OrderStatusRequest

            String replySessionID = "FIX.4.2:MARKET->TRADER";
            LOG.info("Given the requestSessionID '{}' calculated the replySessionID as '{}'", requestSessionID, replySessionID);

            String orderID = exchange.getIn().getHeader("orderID", String.class);

            OrderStatusRequest request = new OrderStatusRequest(new ClOrdID("XYZ"), new Symbol("GOOG"), new Side(Side.BUY));
            request.set(new OrderID(orderID));
            
            // Look for a reply execution report back to the requester session
            // and having the requested OrderID. This is a loose correlation but the best
            // we can do with FIX 4.2. Newer versions of FIX have an optional explicit correlation field.
            exchange.setProperty(QuickfixjProducer.CORRELATION_CRITERIA_KEY, new MessagePredicate(
                new SessionID(replySessionID), MsgType.ORDER_STATUS_REQUEST).withField(OrderID.FIELD, request.getString(OrderID.FIELD)));
           
            exchange.getIn().setBody(request);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.