docs: @Override
    public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException {
      Long limit = null;
      CurrencyPair currencyPair = null;
      Long offset = null;
      TradeHistoryParamsSorted.Order sort = null;
      Long sinceTimestamp = null;
      if (params instanceof TradeHistoryParamPaging) {
        limit = Long.valueOf(((TradeHistoryParamPaging) params).getPageLength());
      }
      if (params instanceof TradeHistoryParamCurrencyPair) {
        currencyPair = ((TradeHistoryParamCurrencyPair) params).getCurrencyPair();
      }
      if (params instanceof TradeHistoryParamOffset) {
        offset = ((TradeHistoryParamOffset) params).getOffset();
      }
      if (params instanceof TradeHistoryParamsSorted) {
        sort = ((TradeHistoryParamsSorted) params).getOrder();
      }
      if (params instanceof TradeHistoryParamsTimeSpan) {
        sinceTimestamp =
            DateUtils.toUnixTimeNullSafe(((TradeHistoryParamsTimeSpan) params).getStartTime());
      }
      BitstampUserTransaction[] txs =
          getBitstampUserTransactions(
              limit, currencyPair, offset, sort == null ? null : sort.toString(), sinceTimestamp);
      return BitstampAdapters.adaptTradeHistory(txs);
    }