org.knowm.xchange.kucoin.KucoinUtils Maven / Gradle / Ivy
package org.knowm.xchange.kucoin;
import org.knowm.xchange.exceptions.ExchangeException;
import org.knowm.xchange.kucoin.dto.KucoinResponse;
public class KucoinUtils {
public static KucoinResponse checkSuccess(KucoinResponse response) {
if (response.isSuccess()) {
return response;
} else {
throw new ExchangeException(response.getCode() + ": " + response.getMsg());
}
}
}