final int orderId = Integer.parseInt(args[0]);
final String market = args.length > 1 ? args[1] : null;
final Boolean withdetail = args.length > 2 ? Boolean.valueOf(args[2]) : null;
BTCChinaGetOrderResponse response;
if (market == null) {
response = tradeServiceRaw.getBTCChinaOrder(orderId);
}
else if (withdetail == null) {
response = tradeServiceRaw.getBTCChinaOrder(orderId, market);
}
else {
response = tradeServiceRaw.getBTCChinaOrder(orderId, market, withdetail);
}
System.out.println(response);
BTCChinaOrder order = response.getResult().getOrder();
System.out.println("OrderID:\t" + order.getId());
System.out.println("Side:\t" + order.getType());
System.out.println("Price:\t" + order.getPrice());
System.out.println("Currency: \t" + order.getCurrency());
System.out.println("LeavesQty:\t" + order.getAmount());