arduino-coinmarketcap-api
arduino-coinmarketcap-api copied to clipboard
Error with json
........ WiFi connected IP address: 192.168.1.9
Getting ticker data for bitcoin Error getting data: Failed to parse JSON
Getting ticker data for ethereum Error getting data: Failed to parse JSON
Getting ticker data for dogecoin Error getting data: Failed to parse JSON
i already installed Arduinojson by Benoit Blanchon Ver 5.13.0
I started getting the same this for coinmarketcap and cryptonator today as well. strange
Error getting data: Failed to parse JSON
Might have to use a proxy to handle the https translation Similar to this example for cryptonator
Check this out: http://httptohttps.mrtimcakes.com/
http://httptohttps.mrtimcakes.com/https://cryptonator.com/api/ticker/btc-usd
Should be able to update the #include <CoinMarketCapApi.h>
seems to work now when you update coinmarketcap fro your arduino IDE
The original version of this library used HTTP as coinmarket cap supported it and its much lighter on memory.
They shut off the HTTP endpoint and now only support HTTPS, so the library had to be upgraded for that.
Not sure if that is the original posters problem, but it explains your issue @gillisllc
This is a bug... The reason for this issue is that the client->stop(); is missing at the end of the SendGetToCoinMarketCap method. After adding this it works fine without the json error :
....
if (avail) {
// Serial.println("Body:");
// Serial.println(body);
// Serial.println("END");
break;
}
}
client->stop();
}
return body;
}
Problem with ArduinoJson-API ?
12:13:36.946 -> Getting ticker data for bitcoin Error getting data: Failed to parse JSON 12:13:40.487 -> ---------------------------
This library is obsolete.
The problem is not ArduinoJson.
The problem is coinmarketcap killed version 1. The library must be changed to supply an API key (version 2).