return new FloatingRateLoanOrder(orderType, currency, amount, dayPeriod, id, null, rate);
}
public static Trade adaptTrade(BitfinexTrade trade, CurrencyPair currencyPair) {
OrderType orderType = trade.getType().equals("buy") ? OrderType.BID : OrderType.ASK;
BigDecimal amount = trade.getAmount();
BigDecimal price = trade.getPrice();
Date date = DateUtils.fromMillisUtc(trade.getTimestamp() * 1000L); // Bitfinex uses Unix timestamps
final String tradeId = String.valueOf(trade.getTradeId());
return new Trade(orderType, amount, currencyPair, price, date, tradeId);