class CoinbaseBaseService extends BaseExchangeService implements BaseService {

  protected final CoinbaseAuthenticated coinbase;
  protected final ParamsDigest signatureCreator;

  /**
   * Constructor
   *
   * @param exchange
   */
  protected CoinbaseBaseService(Exchange exchange) {

    super(exchange);

    coinbase =
        ExchangeRestProxyBuilder.forInterface(
                CoinbaseAuthenticated.class, exchange.getExchangeSpecification())
            .build();
    signatureCreator =
        CoinbaseDigest.createInstance(exchange.getExchangeSpecification().getSecretKey());
  }

  /**
   * Unauthenticated resource that returns currencies supported on Coinbase.
   *
   * @return A list of currency names and their corresponding ISO code.
   * @throws IOException
   */
  public List<CoinbaseCurrency> getCoinbaseCurrencies() throws IOException {

    return coinbase.getCurrencies();
  }

  /**
   * Unauthenticated resource that creates a user with an email and password.
   *
   * @param user New Coinbase User information.
   * @return Information for the newly created user.
   * @throws IOException
   * @see <a
   *     href="https://coinbase.com/api/doc/1.0/users/create.html">coinbase.com/api/doc/1.0/users/create.html</a>
   * @see {@link CoinbaseUser#createNewCoinbaseUser} and {@link
   *     CoinbaseUser#createCoinbaseNewUserWithReferrerId}
   */
  public CoinbaseUser createCoinbaseUser(CoinbaseUser user) throws IOException {

    final CoinbaseUser createdUser = coinbase.createUser(user);
    return handleResponse(createdUser);
  }

  /**
   * Unauthenticated resource that creates a user with an email and password.
   *
   * @param user New Coinbase User information.
   * @param oAuthClientId Optional client id that corresponds to your OAuth2 application.
   * @return Information for the newly created user, including information to perform future OAuth
   *     requests for the user.
   * @throws IOException
   * @see <a
   *     href="https://coinbase.com/api/doc/1.0/users/create.html">coinbase.com/api/doc/1.0/users/create.html</a>
   * @see {@link CoinbaseUser#createNewCoinbaseUser} and {@link
   *     CoinbaseUser#createCoinbaseNewUserWithReferrerId}
   */
  public CoinbaseUser createCoinbaseUser(CoinbaseUser user, final String oAuthClientId)
      throws IOException {

    final CoinbaseUser createdUser = coinbase.createUser(user.withoAuthClientId(oAuthClientId));
    return handleResponse(createdUser);
  }

  /**
   * Creates tokens redeemable for Bitcoin.
   *
   * @return The returned Bitcoin address can be used to send money to the token, and will be
   *     credited to the account of the token redeemer if money is sent both before or after
   *     redemption.
   * @throws IOException
   * @see <a
   *     href="https://coinbase.com/api/doc/1.0/tokens/create.html">coinbase.com/api/doc/1.0/tokens/create.html</a>
   */
  public CoinbaseToken createCoinbaseToken() throws IOException {

    final CoinbaseToken token = coinbase.createToken();
    return handleResponse(token);
  }

  protected <R extends CoinbaseBaseResponse> R handleResponse(R response) {<FILL_FUNCTION_BODY>}
}


    final List<String> errors = response.getErrors();
    if (errors != null && !errors.isEmpty()) {
      throw new ExchangeException(errors.toString());
    }

    return response;
  
<methods>public void verifyOrder(org.knowm.xchange.dto.trade.LimitOrder) ,public void verifyOrder(org.knowm.xchange.dto.trade.MarketOrder) <variables>protected final non-sealed org.knowm.xchange.Exchange exchange