docs: public Map<Long, WexTransHistoryResult> getTransHistory(WexTransHistoryParams params)
        throws ExchangeException, IOException {
  
      Long offset = null;
      Long count = null;
      Long startId = null;
      Long endId = null;
      WexAuthenticated.SortOrder sort = WexAuthenticated.SortOrder.DESC;
      Long startTime = null;
      Long endTime = null;
  
      if (params instanceof TradeHistoryParamPaging) {
        TradeHistoryParamPaging pagingParams = params;
        Integer pageLength = pagingParams.getPageLength();
        Integer pageNumber = pagingParams.getPageNumber();
        if (pageNumber == null) {
          pageNumber = 0;
        }
  
        if (pageLength != null) {
          count = pageLength.longValue();
          offset = (long) (pageLength * pageNumber);
        } else {
          offset = pageNumber.longValue();
        }
      }
  
      if (params instanceof TradeHistoryParamsIdSpan) {
        TradeHistoryParamsIdSpan idParams = params;
        startId = nullSafeToLong(idParams.getStartId());
        endId = nullSafeToLong(idParams.getEndId());
      }
  
      if (params instanceof TradeHistoryParamsTimeSpan) {
        TradeHistoryParamsTimeSpan timeParams = params;
        startTime = nullSafeUnixTime(timeParams.getStartTime());
        endTime = nullSafeUnixTime(timeParams.getEndTime());
      }
  
      if (params instanceof WexTransHistoryParams) {
        sort = params.getSortOrder();
      }
  
      Map<Long, WexTransHistoryResult> resultMap =
          getBTCETransHistory(offset, count, startId, endId, sort, startTime, endTime);
  
      return resultMap;
    }