Binance Long Short Ratio Chart In WordPress

I am trying to make a trade indicator using JSON provided by binance in wordpress.

I am using WP Ninja Tables plugin. My problem is, the data is not refreshing in table after fetching the data from JSON for the first time.

I tried to use custom JS

setInterval(function(){updateChart()},1000);

I also tried

setTimeout(function(){updateChart()}, 1000);

but still i am out of luck.

Binance is updating the data in that JSON file every 5 minutes.

Here is the link to that JSON file.

https://fapi.binance.com/futures/data/globalLongShortAccountRatio?symbol=BTCUSDT&period=5m

I am just a beginner who wants to learn new stuff.

Leave a Comment