public static Trades adaptTrades(LakeBTCTradeResponse[] transactions, CurrencyPair currencyPair) {

    List<Trade> trades = new ArrayList<>();
    long lastTradeId = 0;
    for (LakeBTCTradeResponse trade : transactions) {
      final OrderType orderType = trade.getType().startsWith("buy") ? OrderType.BID : OrderType.ASK;
      trades.add(
          new Trade(
              orderType,
              trade.getAmount(),
              currencyPair,
              trade.getTotal(),
              DateUtils.fromMillisUtc(trade.getAt() * 1000L),
              trade.getId()));
    }

    return new Trades(trades, lastTradeId, Trades.TradeSortType.SortByTimestamp);
  }
public static Trades adaptTrades ( LakeBTCTradeResponse [ ] transactions , CurrencyPair currencyPair ) { List < Trade > trades = new ArrayList < > ( ) ; long lastTradeId = 0 ; for ( LakeBTCTradeResponse trade : transactions ) { final OrderType orderType = trade . getType ( ) . startsWith ( "buy" ) ? OrderType . BID : OrderType . ASK ; trades . add ( new Trade ( orderType , trade . getAmount ( ) , currencyPair , trade . getTotal ( ) , DateUtils . fromMillisUtc ( trade . getAt ( ) * 1000L ) , trade . getId ( ) ) ) ; } return new Trades ( trades , lastTradeId , Trades . TradeSortType . SortByTimestamp ) ; }
Adapts a Transaction[] to a Trades Object

@param transactions The LakeBtc transactions
@param currencyPair (e.g. BTC/USD)
@return The XChange Trades