getData()
.then((json) => {
if (json)
var myBalans = document.getElementById('summ_delivery');
if(!myBalans) {
myBalans = document.createElement("div");
myBalans.id = 'summ_delivery';
document.body.appendChild(myBalans);
}
myBalans.innerHTML = `<div class="price">Сумма: ${json.data.reduce((acc, c) => acc + c.price/100*6, 0)} ${json.data[0].currency}</div>`;
console.log(myBalans);
setInterval(getData, 100000);
});