diff --git a/xchange-gateio-v4/src/main/java/org/knowm/xchange/gateio/GateioErrorAdapter.java b/xchange-gateio-v4/src/main/java/org/knowm/xchange/gateio/GateioErrorAdapter.java index 11324b523f1..9778ce96da1 100644 --- a/xchange-gateio-v4/src/main/java/org/knowm/xchange/gateio/GateioErrorAdapter.java +++ b/xchange-gateio-v4/src/main/java/org/knowm/xchange/gateio/GateioErrorAdapter.java @@ -1,7 +1,14 @@ package org.knowm.xchange.gateio; import lombok.experimental.UtilityClass; -import org.knowm.xchange.exceptions.*; +import org.knowm.xchange.exceptions.ExchangeException; +import org.knowm.xchange.exceptions.ExchangeSecurityException; +import org.knowm.xchange.exceptions.FundsExceededException; +import org.knowm.xchange.exceptions.InstrumentNotValidException; +import org.knowm.xchange.exceptions.InternalServerException; +import org.knowm.xchange.exceptions.OrderAmountUnderMinimumException; +import org.knowm.xchange.exceptions.OrderNotValidException; +import org.knowm.xchange.exceptions.RateLimitExceededException; import org.knowm.xchange.gateio.dto.GateioException; @UtilityClass @@ -42,7 +49,7 @@ public ExchangeException adapt(GateioException e) { return new InternalServerException(e.getMessage(), e); case INVALID_PARAM_VALUE: - if (e.getMessage().contains("below minimum")) { + if (e.getMessage().contains("below minimum") || e.getMessage().contains("too small")) { return new OrderAmountUnderMinimumException(e.getMessage(), e); } else {