Examples of IncompleteOrderInstructions


Examples of com.activequant.exceptions.IncompleteOrderInstructions

    public IOrderTracker prepareOrder(Order order) throws UnsupportedOrderType, IncompleteOrderInstructions {
        if (!(order instanceof LimitOrder))
            throw new UnsupportedOrderType("Order type not supported by exchange: " + order);
        LimitOrder limitOrder = (LimitOrder) order;
        if(limitOrder.getQuantity()<=0.0)
            throw new IncompleteOrderInstructions("Invalid quantity given: " + limitOrder.getQuantity());
        if(limitOrder.getLimitPrice() == null)
            throw new IncompleteOrderInstructions("No limit price given.");
        if(limitOrder.getLimitPrice() <= 0.0)
            throw new IncompleteOrderInstructions("Invalid negative limit price given.");
        VirtualOrderTracker tracker = new VirtualOrderTracker(limitOrder);
        return tracker;
    }
View Full Code Here

Examples of com.activequant.exceptions.IncompleteOrderInstructions

        private LimitOrder order;

        VirtualOrderTracker(LimitOrder order) throws IncompleteOrderInstructions {
            this.order = order;
            if (order.getTradInstId() == null)
                throw new IncompleteOrderInstructions("TradInstID missing");

        }
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.