raw(krakenExchange);
}
private static void generic(Exchange krakenExchange) throws IOException {
PollingTradeService tradeService = krakenExchange.getPollingTradeService();
System.out.println("Open Orders: " + tradeService.getOpenOrders().toString());
// place a limit buy order
LimitOrder limitOrder = new LimitOrder((OrderType.ASK), new BigDecimal(".01"), CurrencyPair.BTC_LTC, "", null, new BigDecimal("51.25"));
String limitOrderReturnValue = tradeService.placeLimitOrder(limitOrder);
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());
}