Examples of buy()


Examples of com.xeiam.xchange.btctrade.service.polling.BTCTradeTradeServiceRaw.buy()

  private static void raw(Exchange exchange) {

    BTCTradeTradeServiceRaw tradeService = (BTCTradeTradeServiceRaw) exchange.getPollingTradeService();

    // Buy.
    String orderId = tradeService.buy(MIN_AMOUNT_PER_ORDER.multiply(new BigDecimal("1000")), MIN_PRICE_IN_CNY).getId();

    // Cancel.
    tradeService.cancelBTCTradeOrder(orderId);

    // Sell.
View Full Code Here

Examples of org.apache.aries.samples.ariestrader.api.TradeServices.buy()

                    int holdings = TradeConfig.rndInt(TradeConfig.getMAX_HOLDINGS() + 1);
                    double quantity = 0;
                    for (int j = 0; j < holdings; j++) {
                        symbol = TradeConfig.rndSymbol();
                        quantity = TradeConfig.rndQuantity();
                        tradeServices.buy(userID, symbol, quantity,
                TradeConfig.orderProcessingMode);
                    }
                    if (i % 50 == 0) {
                        out.println(" has " + holdings + " holdings.");
                        out.flush();
View Full Code Here

Examples of org.apache.aries.samples.ariestrader.api.TradeServices.buy()

                    int holdings = TradeConfig.rndInt(TradeConfig.getMAX_HOLDINGS() + 1);
                    double quantity = 0;
                    for (int j = 0; j < holdings; j++) {
                        symbol = TradeConfig.rndSymbol();
                        quantity = TradeConfig.rndQuantity();
                        tradeServices.buy(userID, symbol, quantity,
                TradeConfig.orderProcessingMode);
                    }
                    if (i % 50 == 0) {
                        out.println(" has " + holdings + " holdings.");
                        out.flush();
View Full Code Here

Examples of org.apache.aries.samples.ariestrader.api.TradeServices.buy()

                    int holdings = TradeConfig.rndInt(TradeConfig.getMAX_HOLDINGS() + 1);
                    double quantity = 0;
                    for (int j = 0; j < holdings; j++) {
                        symbol = TradeConfig.rndSymbol();
                        quantity = TradeConfig.rndQuantity();
                        tradeServices.buy(userID, symbol, quantity,
                TradeConfig.orderProcessingMode);
                    }
                    if (i % 50 == 0) {
                        out.println(" has " + holdings + " holdings.");
                        out.flush();
View Full Code Here

Examples of org.jayasoft.woj.portal.business.services.commercial.FidelityService.buy()

                       
                        // We modify user for fidelity
                        Product p = pendingOrder.getPrice().getProduct();
                        int years = pendingOrder.getSubscribedYears();
                        FidelityService fs = ServiceFactory.getFidelityService();
                        fs.buy(buyer, p, years, pendingOrder.getSubscribedUsers());
                       
                        LOGGER.info("creating invoice...");
                        Invoice invoice = ServiceFactory.getCommercialService().createInvoice(pendingOrder, pendingOrder.getPurchaser());
            ServiceFactory.getRegistrationService().sendLicenseBuyConfirmationMail(pendingOrder.getBuyer(), pendingOrder, lic, invoice);
                        LOGGER.info("payment created");
View Full Code Here

Examples of org.jboss.as.quickstarts.sfsb.ShoppingCart.buy()

        System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
        System.out.println("Obtained the remote interface to the shopping cart");

        /* invoke on the remote interface */
        System.out.println("Buying a \"" + EAP + "\"");
        cart.buy(EAP, 1);
        System.out.println("Buying another \"" + EAP + "\"");
        cart.buy(EAP, 1);

        System.out.println("Buying a \"" + SOAP + "\"");
        cart.buy(SOAP, 1);
View Full Code Here

Examples of org.jboss.as.quickstarts.sfsb.ShoppingCart.buy()

        /* invoke on the remote interface */
        System.out.println("Buying a \"" + EAP + "\"");
        cart.buy(EAP, 1);
        System.out.println("Buying another \"" + EAP + "\"");
        cart.buy(EAP, 1);

        System.out.println("Buying a \"" + SOAP + "\"");
        cart.buy(SOAP, 1);

        System.out.println("\nPrint cart:");
View Full Code Here

Examples of org.jboss.as.quickstarts.sfsb.ShoppingCart.buy()

        cart.buy(EAP, 1);
        System.out.println("Buying another \"" + EAP + "\"");
        cart.buy(EAP, 1);

        System.out.println("Buying a \"" + SOAP + "\"");
        cart.buy(SOAP, 1);

        System.out.println("\nPrint cart:");
        HashMap<String, Integer> cartContents = cart.getCartContents();
        for (String product : cartContents.keySet()) {
            System.out.println(cartContents.get(product) + "     " + product);
View Full Code Here

Examples of org.jboss.as.quickstarts.sfsb.ShoppingCart.buy()

        System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
        System.out.println("Obtained the remote interface to the shopping cart");

        /* invoke on the remote interface */
        System.out.println("Buying a \"" + EAP + "\"");
        cart.buy(EAP, 1);
        System.out.println("Buying another \"" + EAP + "\"");
        cart.buy(EAP, 1);

        System.out.println("Buying a \"" + SOAP + "\"");
        cart.buy(SOAP, 1);
View Full Code Here

Examples of org.jboss.as.quickstarts.sfsb.ShoppingCart.buy()

        /* invoke on the remote interface */
        System.out.println("Buying a \"" + EAP + "\"");
        cart.buy(EAP, 1);
        System.out.println("Buying another \"" + EAP + "\"");
        cart.buy(EAP, 1);

        System.out.println("Buying a \"" + SOAP + "\"");
        cart.buy(SOAP, 1);

        System.out.println("\nPrint cart:");
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.