diff --git a/src/ExchangeSharp/API/Exchanges/KuCoin/ExchangeKuCoinAPI.cs b/src/ExchangeSharp/API/Exchanges/KuCoin/ExchangeKuCoinAPI.cs index 5e42bea4..817a161a 100644 --- a/src/ExchangeSharp/API/Exchanges/KuCoin/ExchangeKuCoinAPI.cs +++ b/src/ExchangeSharp/API/Exchanges/KuCoin/ExchangeKuCoinAPI.cs @@ -62,6 +62,21 @@ public override string PeriodSecondsToString(int seconds) } } + protected override JToken CheckJsonResponse(JToken result) + { + if (result == null) + { + throw new APIException("No result from server"); + } + + if (!string.IsNullOrWhiteSpace(result["msg"].ToStringInvariant())) + { + throw new APIException(result.ToStringInvariant()); + } + + return base.CheckJsonResponse(result); + } + #region ProcessRequest protected override async Task ProcessRequestAsync(IHttpWebRequest request, Dictionary payload)