Package org.archfirst.bfexch.domain.trading.order

Examples of org.archfirst.bfexch.domain.trading.order.Order


        // Extract allOrNone
        boolean allOrNone = message.isSetField(ExecInst.FIELD) &&
            message.getExecInst().getValue().indexOf(ExecInst.ALL_OR_NONE) >= 0;

        // Create Order
        Order order = new Order(
                new DateTime(message.getTransactTime().getValue()),
                message.getClOrdID().getValue(),
                OrderSideConverter.toDomain(message.getSide()),
                symbol,
                OrderQuantityConverter.toDomain(message.getOrderQtyData()),
View Full Code Here


   
    private void onMessage(NewOrderSingle newOrderSingle) {

        // Extract Order
        org.archfirst.bfcommon.jsontrading.Order jsonOrder = newOrderSingle.getOrder();
        Order order = new Order(
                DateTimeUtil.parseISODateTime(jsonOrder.getCreationTime()),
                jsonOrder.getClientOrderId(),
                OrderSide.valueOf(jsonOrder.getSide().toString()),
                jsonOrder.getSymbol(),
                QuantityConverter.toDomain(jsonOrder.getQuantity()),
View Full Code Here

   
    /**
     * Process OrderCancelRequest. Cancels the order if the status change is valid.
     */
    public void processOrderCancelRequest(String clOrdID) {
        Order order = orderRepository.findOrderByClientOrderId(clOrdID);
        if (order == null) {
            logger.error("OrderCancelRequest: clOrdID {} not found", clOrdID);
            return;
        }

        order.cancel();
        if (order.getStatus() == OrderStatus.Canceled) {
            orderEventPublisher.publish(new OrderCanceled(order));
        }
        else {
            orderEventPublisher.publish(new OrderCancelRejected(order));
        }
View Full Code Here

            String type,
            String limitPrice,
            String gtc,
            String allOrNone) {
       
        Order order = new Order(
            DateTimeUtil.parseDateTimeSecond(creationTime),
            clientOrderId,
            OrderSide.valueOf(side),
            symbol,
            new DecimalQuantity(quantity),
View Full Code Here

TOP

Related Classes of org.archfirst.bfexch.domain.trading.order.Order

Copyright © 2018 www.massapicom. 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.