public static void main(String[] args) {

    Exchange bitfloor = BitfloorDemoUtils.getExchange();
    PollingTradeService tradeService = bitfloor.getPollingTradeService();

    printOpenOrders(tradeService);

    // place a limit buy order
    LimitOrder limitOrder =
        new LimitOrder(
            (OrderType.ASK), new BigDecimal("0.01"), "BTC", "USD", MoneyUtils.parse("USD 1250"));
    String limitOrderReturnValue = tradeService.placeLimitOrder(limitOrder);
    System.out.println("Limit Order return value: " + limitOrderReturnValue);

    printOpenOrders(tradeService);

    // Cancel the added order
    boolean cancelResult = tradeService.cancelOrder(limitOrderReturnValue);
    System.out.println("Canceling returned " + cancelResult);

    printOpenOrders(tradeService);
  }
  private static void printOpenOrders(PollingTradeService tradeService) {

    OpenOrders openOrders = tradeService.getOpenOrders();
    System.out.println("Open Orders: " + openOrders.toString());
  }