public static UserTrades adaptTradeHistory(Map<Long, BTCETradeHistoryResult> tradeHistory) {
List<UserTrade> trades = new ArrayList<UserTrade>(tradeHistory.size());
for (Entry<Long, BTCETradeHistoryResult> entry : tradeHistory.entrySet()) {
BTCETradeHistoryResult result = entry.getValue();
OrderType type = result.getType() == BTCETradeHistoryResult.Type.buy ? OrderType.BID : OrderType.ASK;
String[] pair = result.getPair().split("_");
BigDecimal price = result.getRate();
BigDecimal tradableAmount = result.getAmount();
Date timeStamp = DateUtils.fromMillisUtc(result.getTimestamp() * 1000L);
String orderId = String.valueOf(result.getOrderId());