Package com.xeiam.xchange.btctrade.dto.trade

Examples of com.xeiam.xchange.btctrade.dto.trade.BTCTradeOrder


    BTCTradeOrder[] orders = tradeService.getBTCTradeOrders(0, "open");
    System.out.println("Open orders: " + orders.length);

    String orderId = orders.length > 0 ? orders[0].getId() : "1";
    BTCTradeOrder order = tradeService.getBTCTradeOrder(orderId);
    System.out.println("Order status: " + order.getStatus());
  }
View Full Code Here


  public static UserTrades adaptTrades(BTCTradeOrder[] btcTradeOrders, BTCTradeOrder[] btcTradeOrderDetails) {

    List<UserTrade> trades = new ArrayList<UserTrade>();
    for (int i = 0; i < btcTradeOrders.length; i++) {
      BTCTradeOrder order = btcTradeOrders[i];

      CurrencyPair currencyPair = adaptCurrencyPair(order.getCoin());

      if (currencyPair != null) {
        BTCTradeOrder orderDetail = btcTradeOrderDetails[i];

        for (com.xeiam.xchange.btctrade.dto.trade.BTCTradeTrade trade : orderDetail.getTrades()) {
          trades.add(adaptTrade(order, trade, currencyPair));
        }
      }
    }
    return new UserTrades(trades, TradeSortType.SortByTimestamp);
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.btctrade.dto.trade.BTCTradeOrder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.