// place buy order
BTCEOrder.Type type = BTCEOrder.Type.buy;
String pair = "btc_usd";
BTCEOrder btceOrder = new BTCEOrder(0, null, new BigDecimal("1"), new BigDecimal("0.1"), type, pair);
BTCEPlaceOrderResult result = null;
try {
result = tradeService.placeBTCEOrder(btceOrder);
System.out.println("placeBTCEOrder return value: " + result);
printRawOpenOrders(tradeService);
// Cancel the added order
BTCECancelOrderResult cancelResult = tradeService.cancelBTCEOrder(result.getOrderId());
System.out.println("Canceling returned " + cancelResult);
} catch (ExchangeException e) {
System.out.println(e.getMessage());
}