data.slice(0, 8).forEach(token => {
const change = parseFloat(token.change_percent);
const changeClass = change >= 0 ? 'up' : 'down';
const changeIcon = change >= 0 ? '▲' : '▼';
container.innerHTML +=
${token.name}
${parseInt(token.price_toman).toLocaleString('fa-IR')}
${changeIcon} ${Math.abs(change).toFixed(2)}%
;
});
} catch (error) {
document.getElementById('tokens').innerHTML = 'خطا در بارگذاری';
}
}
loadTokens();
setInterval(loadTokens, 30000); // بروزرسانی هر 30 ثانیه
This page was created by Litebase Page Builder and has no affiliation with other sites