Examples of cancelOrder()


Examples of com.jada.order.document.CreditEngine.cancelOrder()

      CreditHeader creditHeader = (CreditHeader) em.find(CreditHeader.class, Format.getLong(form.getCreditHeaderId()));
      CreditEngine creditEngine = new CreditEngine(creditHeader, user);
      initOrder(form, orderHeader, null, creditHeader, null, request);

      try {
        creditEngine.cancelOrder();
      } catch (OrderStateException exception) {
          ActionMessages errors = new ActionMessages();
          errors.add("credit", new ActionMessage("error.credit.cancel"));
        ActionForward actionForward = actionMapping.findForward("error");
        return actionForward;
View Full Code Here

Examples of com.jada.order.document.InvoiceEngine.cancelOrder()

      InvoiceHeader invoiceHeader = (InvoiceHeader) em.find(InvoiceHeader.class, Format.getLong(form.getInvoiceHeaderId()));
      InvoiceEngine invoiceEngine = new InvoiceEngine(invoiceHeader, user);
      initOrder(form, orderHeader, invoiceHeader, null, null, request);

      try {
        invoiceEngine.cancelOrder();
      } catch (OrderStateException exception) {
          ActionMessages errors = new ActionMessages();
          errors.add("invoice", new ActionMessage("error.invoice.cancel"));
        ActionForward actionForward = actionMapping.findForward("error");
        return actionForward;
View Full Code Here

Examples of com.jada.order.document.ShipEngine.cancelOrder()

      ShipHeader shipHeader = (ShipHeader) em.find(ShipHeader.class, Format.getLong(form.getShipHeaderId()));
      ShipEngine shipEngine = new ShipEngine(shipHeader, user);
      initOrder(form, orderHeader, null, null, shipHeader, request);

      try {
        shipEngine.cancelOrder();
      } catch (OrderStateException exception) {
          ActionMessages errors = new ActionMessages();
          errors.add("ship", new ActionMessage("error.ship.cancel"));
        ActionForward actionForward = actionMapping.findForward("error");
        return actionForward;
View Full Code Here

Examples of com.xeiam.xchange.justcoin.service.polling.JustcoinTradeServiceRaw.cancelOrder()

    System.out.println("Limit Order Id: " + orderId);

    System.out.println("Open Orders: " + Arrays.toString(justcoinSpecificTradeService.getOrders()));

    // Cancel the added order
    boolean cancelResult = justcoinSpecificTradeService.cancelOrder(orderId);
    System.out.println("Canceling order " + orderId + " returned " + cancelResult);

    System.out.println("Open Orders: " + Arrays.toString(justcoinSpecificTradeService.getOrders()));
  }
}
View Full Code Here

Examples of com.xeiam.xchange.service.polling.PollingTradeService.cancelOrder()

    System.out.println("Limit Order return value: " + limitOrderReturnValue);

    System.out.println("Open Orders: " + tradeService.getOpenOrders().toString());

    // Cancel the added order
    boolean cancelResult = tradeService.cancelOrder(limitOrderReturnValue);
    System.out.println("Canceling returned " + cancelResult);
    System.out.println("Open Orders: " + tradeService.getOpenOrders().toString());
  }

  private static void raw(Exchange krakenExchange) throws IOException {
View Full Code Here

Examples of com.xeiam.xchange.service.polling.PollingTradeService.cancelOrder()

    // Bid.
    String orderId = tradeService.placeLimitOrder(new LimitOrder(OrderType.BID, MIN_AMOUNT_PER_ORDER.multiply(new BigDecimal("1000")), CurrencyPair.BTC_CNY, null, null, MIN_PRICE_IN_CNY));

    // Cancel.
    tradeService.cancelOrder(orderId);

    // Ask.
    orderId = tradeService.placeLimitOrder(new LimitOrder(OrderType.ASK, MIN_AMOUNT_PER_ORDER, CurrencyPair.BTC_CNY, null, null, new BigDecimal(Integer.MAX_VALUE)));

    // Cancel.
View Full Code Here

Examples of com.xeiam.xchange.service.polling.PollingTradeService.cancelOrder()

    // Ask.
    orderId = tradeService.placeLimitOrder(new LimitOrder(OrderType.ASK, MIN_AMOUNT_PER_ORDER, CurrencyPair.BTC_CNY, null, null, new BigDecimal(Integer.MAX_VALUE)));

    // Cancel.
    tradeService.cancelOrder(orderId);
  }

  private static void raw(Exchange exchange) {

    BTCTradeTradeServiceRaw tradeService = (BTCTradeTradeServiceRaw) exchange.getPollingTradeService();
View Full Code Here

Examples of com.xeiam.xchange.service.polling.PollingTradeService.cancelOrder()

    System.out.println("Limit Order Id: " + orderId);

    System.out.println("Open Orders: " + genericTradeService.getOpenOrders());

    // Cancel the added order
    boolean cancelResult = genericTradeService.cancelOrder(orderId);
    System.out.println("Canceling order " + orderId + " returned " + cancelResult);

    System.out.println("Open Orders: " + genericTradeService.getOpenOrders());
  }
View Full Code Here

Examples of com.xeiam.xchange.service.polling.PollingTradeService.cancelOrder()

    System.out.println("Limit Order return value: " + limitOrderReturnValue);

    printOpenOrders(tradeService);

    // Cancel the added order
    boolean cancelResult = tradeService.cancelOrder(limitOrderReturnValue);
    // boolean cancelResult = tradeService.cancelOrder("Buy-1234");
    System.out.println("Canceling returned " + cancelResult);

    printOpenOrders(tradeService);
  }
View Full Code Here

Examples of com.xeiam.xchange.service.polling.PollingTradeService.cancelOrder()

    OpenOrders openOrders = trades.getOpenOrders();
    System.out.println("open orders: " + openOrders);

    for (LimitOrder o : openOrders.getOpenOrders()) {
      System.out.println("Order " + o.getId() + " .. cancelling!");
      System.out.println(trades.cancelOrder(o.getId()));

    }

    String placeLimitOrder1 = trades.placeLimitOrder(new LimitOrder(OrderType.BID, BigDecimal.valueOf(10), new CurrencyPair("XBT", "USD"), "0", new Date(), BigDecimal.valueOf(300)));
    String placeLimitOrder2 = trades.placeLimitOrder(new LimitOrder(OrderType.BID, BigDecimal.valueOf(10), new CurrencyPair("XBT", "USD"), "0", new Date(), BigDecimal.valueOf(350)));
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.