How to display response from api whereof data is changing continuously?

I am using vuejs and Axios.

I have an API, whose response is changing continuously and I want to display that updated data on the front end without reloading the page.

I am using this API

Currently, I am doing something this

methods: {
        .then(response => {
            this.liveData =;

I am calling this function through mounted, here i am getting the response but its not changing it self I have to hard reload the page.How I will get the data updated automatically.

So far I have found about few plugins, but stuck at how to use that like and a term websocket but dont know how to use this also.

Thank you.

@theshashiverma Hi, use javascript setInterval() method

Example :

Called your getLiveData() method in every 5 second
var myVar = setInterval(getLiveData, 5000);

And clear your interval on destroyed life cycle hook


for more information about setInterval() and clearInterval() please chek this link: