class PaymiumTradeService extends PaymiumTradeServiceRaw implements TradeService {

  /**
   * Constructor
   *
   * @param exchange
   */
  public PaymiumTradeService(Exchange exchange) {
    super(exchange);
  }

  @Override
  public TradeHistoryParams createTradeHistoryParams() {
    return new PaymiumHistoryParams();
  }

  @Override
  public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException {<FILL_FUNCTION_BODY>}
}


    Long offset = null;
    Integer limit = null;

    if (params instanceof TradeHistoryParamOffset) {
      final TradeHistoryParamOffset historyParamOffset = (TradeHistoryParamOffset) params;
      offset = historyParamOffset.getOffset();
    }

    if (params instanceof TradeHistoryParamLimit) {
      final TradeHistoryParamLimit historyParamLimit = (TradeHistoryParamLimit) params;
      limit = historyParamLimit.getLimit();
    }

    List<UserTrade> userTrades = new ArrayList();
    List<PaymiumOrder> orders = getPaymiumOrders(offset, limit);

    for (PaymiumOrder order : orders) {
      Order.OrderType orderType = null;
      Currency currencyFee = null;
      BigDecimal fee = null;

      switch (order.getDirection()) {
        case "buy":
          orderType = Order.OrderType.ASK;
          currencyFee = Currency.BTC;
          fee = order.getBtcFee();
          break;
        case "sell":
          orderType = Order.OrderType.BID;
          currencyFee = Currency.EUR;
          fee = order.getCurrencyFee();
          break;
      }

      UserTrade userTrade =
          UserTrade.builder()
              .type(orderType)
              .originalAmount(order.getTradedCurrency())
              .currencyPair(CurrencyPair.BTC_EUR)
              .price(order.getPrice())
              .id(order.getUuid())
              .orderId(order.getUuid())
              .feeAmount(fee)
              .feeCurrency(currencyFee)
              .build();

      userTrades.add(userTrade);
    }

    return new UserTrades(userTrades, Trades.TradeSortType.SortByTimestamp);
  
<methods>public void <init>(org.knowm.xchange.Exchange) ,public List<org.knowm.xchange.paymium.dto.account.PaymiumOrder> getPaymiumOrders(java.lang.Long, java.lang.Integer) throws java.io.IOException<variables>protected org.knowm.xchange.paymium.PaymiumAuthenticated paymiumAuthenticated