All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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());
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy