Examples of DecimalQuantity


Examples of org.archfirst.common.quantity.DecimalQuantity

        Order order = new Order(
            DateTimeUtil.parseDateTimeSecond(creationTime),
            clientOrderId,
            OrderSide.valueOf(side),
            symbol,
            new DecimalQuantity(quantity),
            OrderType.valueOf(type),
            (StringUtils.isEmpty(limitPrice)) ? null : new Money(limitPrice),
            (StringUtils.equalsIgnoreCase(gtc, "Y")) ?
                    OrderTerm.GoodTilCanceled : OrderTerm.GoodForTheDay,
            (StringUtils.equalsIgnoreCase(allOrNone, "Y")) ? true : false);
View Full Code Here

Examples of org.archfirst.common.quantity.DecimalQuantity

        this.createExternalAccount1();
    }
   
    public List<Lot> transfer(String symbol, BigDecimal quantity) {
        this.baseAccountService.transferSecurities(
                USERNAME1, symbol, new DecimalQuantity(quantity), new Money(),
                externalAccount1Id, brokerageAccount1Id);
       
        List<Lot> lots =
            this.brokerageAccountService.findActiveLots(brokerageAccount1Id);
        Collections.sort(lots, new Lot.CreationTimeComparator());
View Full Code Here

Examples of org.archfirst.common.quantity.DecimalQuantity

    public static int toJson(DecimalQuantity quantity) {
        return (quantity == null) ? 0 : quantity.getValue().intValue();
    }
   
    public static DecimalQuantity toDomain(int quantity) {
        return new DecimalQuantity(quantity);
    }
View Full Code Here

Examples of org.archfirst.common.quantity.DecimalQuantity

        }
        public String getSymbol() {
            return executionReport.getSymbol();
        }
        public String getLastQty() {
            DecimalQuantity lastQty = executionReport.getLastQty();
            return (lastQty != null) ? lastQty.toString() : "";
        }
View Full Code Here

Examples of org.archfirst.common.quantity.DecimalQuantity

    }
   
    public void transferIn(String symbol, BigDecimal quantity, BigDecimal price) {
        this.baseAccountService.transferSecurities(
                USERNAME1, symbol,
                new DecimalQuantity(quantity), new Money(price),
                externalAccount1Id, brokerageAccount1Id);
    }
View Full Code Here

Examples of org.archfirst.common.quantity.DecimalQuantity

       
        // Execute the trade
        executionReport = ExecutionReport.createTradeType(
                order,
                OrderStatus.Filled,
                new DecimalQuantity(quantity),
                new Money());
        this.brokerageAccountService.processExecutionReport(executionReport);
       
        List<Lot> lots =
            this.brokerageAccountService.findActiveLots(brokerageAccount1Id);
View Full Code Here

Examples of org.archfirst.common.quantity.DecimalQuantity

    }
   
    public void transferIn(String symbol, BigDecimal quantity, BigDecimal price) {
        this.baseAccountService.transferSecurities(
                USERNAME1, symbol,
                new DecimalQuantity(quantity), new Money(price),
                externalAccount1Id, brokerageAccount1Id);
    }
View Full Code Here

Examples of org.archfirst.common.quantity.DecimalQuantity

                externalAccount1Id, brokerageAccount1Id);
    }

    public List<Lot> transferOut(String symbol, BigDecimal quantity) {
        this.baseAccountService.transferSecurities(
                USERNAME1, symbol, new DecimalQuantity(quantity), new Money(),
                brokerageAccount1Id, externalAccount1Id);
       
        List<Lot> lots =
            this.brokerageAccountService.findActiveLots(brokerageAccount1Id);
        Collections.sort(lots, new Lot.CreationTimeComparator());
View Full Code Here

Examples of org.archfirst.common.quantity.DecimalQuantity

       
        // Execute the trade
        executionReport = ExecutionReport.createTradeType(
                order,
                OrderStatus.Filled,
                new DecimalQuantity(quantity),
                new Money(pricePaidPerShare));
        this.brokerageAccountService.processExecutionReport(executionReport);
       
        List<Lot> lots =
            this.brokerageAccountService.findActiveLots(brokerageAccount1Id);
View Full Code Here

Examples of org.archfirst.common.quantity.DecimalQuantity

    }

    public void transferSecurities(String symbol, BigDecimal quantity, BigDecimal price) {
        this.baseAccountService.transferSecurities(
                USERNAME1, symbol,
                new DecimalQuantity(quantity), new Money(price),
                externalAccount1Id, brokerageAccount1Id);
    }
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.