I couldn't find any answer for my issue.
I already run html file with javascript, which showed me on my website actual rate.
<div id="price1"></div>
const API_URL = 'https://api.coinmarketcap.com/v1/ticker/?limit=1';
function displayData() {
fetch(API_URL)
.then(res => res.json())
.then(json => {
const topCoin = json[0];
document.getElementById('price1').innerHTML = `${topCoin.price_usd}` + "BTC";
});
}
setInterval(displayData, 500);
But what I want is have this rate writed to .txt file. Is it possible do it with javascript or do I have to use another language? If I have to use another way can you help me out?