class OKCoinBaseTradeService extends OkCoinBaseService {

  protected final OkCoin okCoin;
  protected final String apikey;
  protected final String secretKey;

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

    super(exchange);

    okCoin =
        ExchangeRestProxyBuilder.forInterface(OkCoin.class, exchange.getExchangeSpecification())
            .build();
    apikey = exchange.getExchangeSpecification().getApiKey();
    secretKey = exchange.getExchangeSpecification().getSecretKey();
  }

  protected OkCoinDigest signatureCreator() {
    return new OkCoinDigest(apikey, secretKey);
  }

  protected static <T extends OkCoinErrorResult> T returnOrThrow(T t) {<FILL_FUNCTION_BODY>}
}


    if (t.isResult()) {
      return t;
    } else {
      throw new ExchangeException(OkCoinUtils.getErrorMessage(t.getErrorCode()));
    }
  
<methods>public void <init>(org.knowm.xchange.Exchange) <variables>protected final non-sealed boolean useIntl