Hot to get data from api and store in database and display on a website

I am trying to do the following:
Get the data from the following API:
https://www.bitstamp.net/api/ticker/

for example, I want to extract the “last” data in the API and display it on the website

and store each piece of data in a database and finally I want to be able to display in real time on the website.

I have very basic experience using templates and stuff but if someone could help me out, it would be great. Also, I want the data to be updated every 1 minute.(I’m guessing that that “setInterval” needs to be used)
I have had a look at the http docs but dont understand it properly.

You could take a look at the code in https://github.com/robfallows/ukgrid which polls a couple of (XML) API endpoints every minute, saves the data and displays it reactively.

It’s probably not quite what you’re looking for - getting XML data is not as easy as JSON, but it may help. Not much in the way of comments, either, as it was just an exercise.

1 Like

Thanks. Unfortunately, I need to retrieve JSON data.