ExchangeSharp
ExchangeSharp copied to clipboard
Kraken Get ticker failing
The kraken provider is failing when fetching the tickers.
The error from the API is 3 errors of EQuery:Unknown asset pair, which I've narrowed down to the AED pairs. There is still a result with the other tickers so it should not fail.
In our forked variant in BTCPay, we are doing the following:
var result = JsonConvert.DeserializeObject<T>(stringResult);
if (result is JToken json)
{
if (!(json is JArray) && json["result"] is JObject {Count: > 0} pairResult)
{
return (T)(object)(pairResult);
}
if (!(json is JArray) && json["error"] is JArray error && error.Count != 0)
{
throw new APIException(string.Join("\n",
error.Select(token => token.ToStringInvariant()).Distinct()));
}
result = (T)(object)(json["result"] ?? json);
}
return result
Thanks for reporting this. Would you be able to send a PR with these changes?
@Kukks I just tested them out, but wasn't able to reproduce your issue. Both GetTickersAsync() and GetTickersWebSocketAsync() seem to work for me. Could you post a repro? (or sending the PR is still fine too)
Closing due to inactivity.