Package com.xeiam.xchange.btctrade.service.polling

Examples of com.xeiam.xchange.btctrade.service.polling.BTCTradeTradeServiceRaw


    tradeService.cancelOrder(orderId);
  }

  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.
    orderId = tradeService.sell(MIN_AMOUNT_PER_ORDER, new BigDecimal(Integer.MAX_VALUE)).getId();

    // Cancel.
    tradeService.cancelBTCTradeOrder(orderId);
  }
View Full Code Here


    System.out.println("Trades: " + trades);
  }

  private static void raw(Exchange exchange) {

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

    BTCTradeOrder[] orders = tradeService.getBTCTradeOrders(0, "open");
    System.out.println("Open orders: " + orders.length);

    String orderId = orders.length > 0 ? orders[0].getId() : "1";
    BTCTradeOrder order = tradeService.getBTCTradeOrder(orderId);
    System.out.println("Order status: " + order.getStatus());
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.btctrade.service.polling.BTCTradeTradeServiceRaw

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.