Coinmarket API

I built a thing which stores and displays digital currency market data

Check out the live feed at http://designerofstuff.com/coinmk

Grab the repo and mess around with it here: https://github.com/haa-gg/Coin-Market-API-Example

More specifically, the goal is to create a script which talks to the Coin Market API (https://api.coinmarketcap.com/v1/ticker/), gets the relevant data for all 1000-something digital currencies out in the wild and puts the current values into a SQL database that I can refrence later. The live feed was more of a bi-product that I got attached to.

The heavy lifting of this project was to set up a database, write a SQL command to input the relevant data from the API into the database, then set the command to run once a day by means of a cron job.

Here’s the code you need to make the live feed section work, all neat n’ tidy

Here’s what makes the back end tick:

dbupdate.php (where the real action is)

Login.php (Database credentials that I have to swap to fake values so nobody turns my site into a zombie minion)

Apicall.php (Super tiny file to get data from the friendliest API I’ve ever met, no need for credentials to get data!)