class BitmexAccountService extends BitmexAccountServiceRaw implements AccountService {

  /**
   * Constructor
   *
   * @param exchange
   */
  public BitmexAccountService(BitmexExchange exchange) {

    super(exchange);
  }

  public TradeHistoryParams createFundingHistoryParams() {
    return new BitmexTradeHistoryParams();
  }

  @Override
  public AccountInfo getAccountInfo() throws IOException {

    BitmexAccount account = super.getBitmexAccountInfo();
    BitmexMarginAccount bitmexMarginAccount = getBitmexMarginAccountStatus();
    BigDecimal amount = bitmexMarginAccount.getAmount().divide(BigDecimal.valueOf(100_000_000L));
    BigDecimal available =
        bitmexMarginAccount.getAvailableMargin().divide(BigDecimal.valueOf(100_000_000L));

    List<Balance> balances = new ArrayList<>();
    balances.add(new Balance(Currency.BTC, amount, available));

    Wallet wallet =
        Wallet.Builder.from(balances)
            .id("margin")
            .features(EnumSet.of(Wallet.WalletFeature.MARGIN_TRADING, Wallet.WalletFeature.FUNDING))
            .maxLeverage(BigDecimal.valueOf(100))
            .currentLeverage(bitmexMarginAccount.getMarginLeverage())
            .build();

    return new AccountInfo(account.getUsername(), wallet);
  }

  @Override
  public String withdrawFunds(Currency currency, BigDecimal amount, String address)
      throws IOException {
    return withdrawFunds(currency.getCurrencyCode(), amount, address);
  }

  @Override
  public String requestDepositAddress(Currency currency, String... args) throws IOException {
    String currencyCode = adaptCurrency(currency);
    return requestDepositAddress(currencyCode);
  }

  @Override
  public List<FundingRecord> getFundingHistory(TradeHistoryParams params) {<FILL_FUNCTION_BODY>}
}


    Currency currency = null;
    Integer count = null;
    Long start = null;

    if (params instanceof TradeHistoryParamCurrency) {
      currency = ((TradeHistoryParamCurrency) params).getCurrency();
    } else {
      throw new ExchangeException("Currency must be supplied");
    }

    if (params instanceof TradeHistoryParamLimit) {
      count = ((TradeHistoryParamLimit) params).getLimit();
    }

    if (params instanceof TradeHistoryParamOffset) {
      start = ((TradeHistoryParamOffset) params).getOffset();
    }

    return getBitmexWalletHistory(currency, count, start).stream()
        .map(BitmexAdapters::adaptFundingRecord)
        .collect(Collectors.toList());
  
<methods>public void <init>(org.knowm.xchange.bitmex.BitmexExchange) ,public org.knowm.xchange.bitmex.dto.account.BitmexAccount getBitmexAccountInfo() throws org.knowm.xchange.exceptions.ExchangeException,public org.knowm.xchange.bitmex.dto.account.BitmexMarginAccount getBitmexMarginAccountStatus() throws org.knowm.xchange.exceptions.ExchangeException,public List<org.knowm.xchange.bitmex.dto.account.BitmexMarginAccount> getBitmexMarginAccountsStatus() throws org.knowm.xchange.exceptions.ExchangeException,public transient org.knowm.xchange.bitmex.dto.account.BitmexWallet getBitmexWallet(org.knowm.xchange.currency.Currency[]) throws org.knowm.xchange.exceptions.ExchangeException,public List<org.knowm.xchange.bitmex.dto.account.BitmexWalletTransaction> getBitmexWalletHistory(org.knowm.xchange.currency.Currency) throws org.knowm.xchange.exceptions.ExchangeException,public List<org.knowm.xchange.bitmex.dto.account.BitmexWalletTransaction> getBitmexWalletHistory(org.knowm.xchange.currency.Currency, java.lang.Integer, java.lang.Long) throws org.knowm.xchange.exceptions.ExchangeException,public List<org.knowm.xchange.bitmex.dto.account.BitmexWalletTransaction> getBitmexWalletSummary(org.knowm.xchange.currency.Currency) throws org.knowm.xchange.exceptions.ExchangeException,public java.lang.String requestDepositAddress(java.lang.String) throws org.knowm.xchange.exceptions.ExchangeException,public java.lang.String withdrawFunds(java.lang.String, java.math.BigDecimal, java.lang.String) throws org.knowm.xchange.exceptions.ExchangeException<variables>java.lang.String apiKey