class CoinbaseAccountServiceRaw extends CoinbaseBaseService {

  public CoinbaseAccountServiceRaw(Exchange exchange) {
    super(exchange);
  }

  public CoinbaseTransactionsResponse getTransactions(String accountId) throws IOException {
    String apiKey = exchange.getExchangeSpecification().getApiKey();
    BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();

    return coinbase.getTransactions(
        Coinbase.CB_VERSION_VALUE, apiKey, signatureCreator2, timestamp, accountId);
  }

  public Map getDeposits(String accountId) throws IOException {
    String apiKey = exchange.getExchangeSpecification().getApiKey();
    BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();

    return coinbase.getDeposits(
        Coinbase.CB_VERSION_VALUE, apiKey, signatureCreator2, timestamp, accountId);
  }

  public Map getWithdrawals(String accountId) throws IOException {
    String apiKey = exchange.getExchangeSpecification().getApiKey();
    BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();

    return coinbase.getWithdrawals(
        Coinbase.CB_VERSION_VALUE, apiKey, signatureCreator2, timestamp, accountId);
  }

  /**
   * Authenticated resource that shows the current user accounts.
   *
   * @see <a
   *     href="https://developers.coinbase.com/api/v2#list-accounts">developers.coinbase.com/api/v2#list-accounts</a>
   */
  public List<CoinbaseAccount> getCoinbaseAccounts() throws IOException {
    String apiKey = exchange.getExchangeSpecification().getApiKey();

    List<CoinbaseAccount> returnList = new ArrayList<>();
    List<CoinbaseAccount> tmpList = null;

    String lastAccount = null;
    do {
      BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();

      tmpList =
          coinbase
              .getAccounts(
                  Coinbase.CB_VERSION_VALUE, apiKey, signatureCreator2, timestamp, 100, lastAccount)
              .getData();

      lastAccount = null;
      if (tmpList != null && tmpList.size() > 0) {
        returnList.addAll(tmpList);
        lastAccount = tmpList.get(tmpList.size() - 1).getId();
      }

    } while (lastAccount != null && isValidUUID(lastAccount));

    return returnList;
  }

  private boolean isValidUUID(String uuid) {
    try {
      UUID.fromString(uuid);
      return true;
    } catch (IllegalArgumentException exception) {
      return false;
    }
  }

  /**
   * Authenticated resource that shows the current user account for the give currency.
   *
   * @see <a
   *     href="https://developers.coinbase.com/api/v2#show-an-account">developers.coinbase.com/api/v2#show-an-account</a>
   */
  public CoinbaseAccount getCoinbaseAccount(Currency currency) throws IOException {
    String apiKey = exchange.getExchangeSpecification().getApiKey();
    BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();

    return coinbase
        .getAccount(
            Coinbase.CB_VERSION_VALUE,
            apiKey,
            signatureCreator2,
            timestamp,
            currency.getCurrencyCode())
        .getData();
  }

  /**
   * Authenticated resource that creates a new BTC account for the current user.
   *
   * @see <a
   *     href="https://developers.coinbase.com/api/v2#create-account">developers.coinbase.com/api/v2#create-account</a>
   */
  public CoinbaseAccount createCoinbaseAccount(String name) throws IOException {<FILL_FUNCTION_BODY>}

  /**
   * Authenticated resource that shows the current user payment methods.
   *
   * @see <a
   *     href="https://developers.coinbase.com/api/v2#list-payment-methods">developers.coinbase.com/api/v2?shell#list-payment-methods</a>
   */
  public List<CoinbasePaymentMethod> getCoinbasePaymentMethods() throws IOException {
    String apiKey = exchange.getExchangeSpecification().getApiKey();
    BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();

    return coinbase
        .getPaymentMethods(Coinbase.CB_VERSION_VALUE, apiKey, signatureCreator2, timestamp)
        .getData();
  }

  public static class CreateCoinbaseAccountPayload {
    @JsonProperty String name;

    CreateCoinbaseAccountPayload(String name) {
      this.name = name;
    }
  }
}


    CreateCoinbaseAccountPayload payload = new CreateCoinbaseAccountPayload(name);

    String path = "/v2/accounts";
    String apiKey = exchange.getExchangeSpecification().getApiKey();
    BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();
    String body = new ObjectMapper().writeValueAsString(payload);
    String signature = getSignature(timestamp, HttpMethod.POST, path, body);
    showCurl(HttpMethod.POST, apiKey, timestamp, signature, path, body);

    return coinbase
        .createAccount(
            MediaType.APPLICATION_JSON,
            Coinbase.CB_VERSION_VALUE,
            apiKey,
            signature,
            timestamp,
            payload)
        .getData();
  
<methods>public List<org.knowm.xchange.coinbase.v2.dto.marketdata.CoinbaseCurrencyData.CoinbaseCurrency> getCoinbaseCurrencies() throws java.io.IOException,public org.knowm.xchange.coinbase.v2.dto.marketdata.CoinbaseTimeData.CoinbaseTime getCoinbaseTime() throws java.io.IOException<variables>protected final non-sealed org.knowm.xchange.coinbase.v2.CoinbaseAuthenticated coinbase,protected final non-sealed org.knowm.xchange.coinbase.v2.CoinbaseV2Digest signatureCreator2