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()));
}