Package com.xeiam.xchange.justcoin.service.polling

Examples of com.xeiam.xchange.justcoin.service.polling.JustcoinTradeServiceRaw


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

  private static void raw(Exchange justcoinExchange) throws IOException {

    JustcoinTradeServiceRaw justcoinSpecificTradeService = (JustcoinTradeServiceRaw) justcoinExchange.getPollingTradeService();

    JustcoinTrade[] trades = justcoinSpecificTradeService.getOrderHistory();
    System.out.println("Trade History: " + trades);

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

    // Place a bid limit order to buy BTC priced in LTC
    LimitOrder limitOrder = new LimitOrder(OrderType.BID, new BigDecimal("0.01"), CurrencyPair.BTC_LTC, "", null, new BigDecimal("10"));
    String orderId = justcoinSpecificTradeService.placeLimitOrder(limitOrder);
    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

TOP

Related Classes of com.xeiam.xchange.justcoin.service.polling.JustcoinTradeServiceRaw

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.