Package com.xeiam.xchange.coinsetter.dto.order.response

Examples of com.xeiam.xchange.coinsetter.dto.order.response.CoinsetterOrderResponse


   * {@inheritDoc}
   */
  @Override
  public boolean cancelOrder(String orderId) throws IOException {

    CoinsetterOrderResponse response = orderServiceRaw.cancel(getSession().getUuid(), UUID.fromString(orderId));
    return "SUCCESS".equals(response.getRequestStatus());
  }
View Full Code Here


    // Add order
    log.info("Adding order...");
    CoinsetterOrderRequest request =
        new CoinsetterOrderRequest(clientSession.getCustomerUuid(), tradeAccount.getAccountUuid(), "BTCUSD", "BUY", "LIMIT", new BigDecimal("0.01"), 2, new BigDecimal("0.01"));
    CoinsetterOrderResponse orderResponse = orderService.add(clientSession.getUuid(), request);
    log.info("add order response: {}", orderResponse);

    // Get order
    log.info("Getting order...");
    CoinsetterOrder orderStatus = orderService.get(clientSession.getUuid(), orderResponse.getUuid());
    log.info("order {}: {}", orderStatus.getUuid(), orderStatus.getStage());

    // List order
    log.info("Listing order...");
    CoinsetterOrderList orderList = orderService.list(clientSession.getUuid(), tradeAccount.getAccountUuid(), "NEW-FILL");
    for (CoinsetterOrder order : orderList.getOrderList()) {
      log.info("order {}: {}", order.getUuid(), order.getStage());
    }

    // Cancel order
    log.info("Cancelling order...");
    orderResponse = orderService.cancel(clientSession.getUuid(), orderResponse.getUuid());
    log.info("cancel order response: {}", orderResponse);

    clientSessionService.logout(clientSession.getUuid());
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.coinsetter.dto.order.response.CoinsetterOrderResponse

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.