class BitbayBaseService extends BaseExchangeService implements BaseService {

  final BitbayAuthenticated bitbayAuthenticated;
  final ParamsDigest sign;
  final String apiKey;

  /**
   * Constructor
   *
   * @param exchange
   */
  BitbayBaseService(Exchange exchange) {
    super(exchange);

    bitbayAuthenticated =
        ExchangeRestProxyBuilder.forInterface(
                BitbayAuthenticated.class, exchange.getExchangeSpecification())
            .build();
    sign = BitbayDigest.createInstance(exchange.getExchangeSpecification().getSecretKey());
    apiKey = exchange.getExchangeSpecification().getApiKey();
  }

  void checkError(BitbayBaseResponse response) {<FILL_FUNCTION_BODY>}
}

    if (response.getStatus().equalsIgnoreCase("fail")) {
      List<String> errors = response.getErrors();
      if (errors == null || errors.isEmpty()) {
        throw new ExchangeException("Bitbay API unexpected error");
      }
      Iterator<String> errorsIterator = errors.iterator();
      StringBuilder message = new StringBuilder("Bitbay API error: ").append(errorsIterator.next());
      while (errorsIterator.hasNext()) {
        message.append(", ").append(errorsIterator.next());
      }
      throw new ExchangeException(message.toString());
    }
  
<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