We were somewhat surprised about the lack of simple examples for getting cryptocurrency data from free API's. As most people are using either OLED displays or external Apps to display the data, most code samples were highly convoluted. To get us started, we simply wanted a program that would fetch the data, and print it to the Serial Monitor. Because we couldn't find anything out there–without going through commit histories–we decided to post our own:
And so, we've added to our ESP826 Demos Github repository two minimalistic samples with the code needed to fetch Bitcoin data from Coindesk and Coinmarketcap. The code can be easily modified to fetch any other cryptocurrency available on the APIs, as well as the price data in other currencies (e.g., EUR, GBP).
To use these programs yYou'll need to install (only) two things:
- Support for ESP8266 (through the Board Manager or your preferred method)
- ArduinoJson library (through the Library Manager or your preferred method)
Please visit our repository for getting the code:
https://github.com/acrobotic/Ai_Demos_ESP8266/tree/master/crypto_ticker
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.