Monero Moonwatcher

Monero (XMR)

Real-time price tracking

$---.-- --.--% (24h)

Market Statistics

Market Cap $---.--
24h Volume $---.--
Circ. Supply --.-- XMR

Price Alerts

${alerts.map(alert => `
${alert.type === 'above' ? 'Above' : 'Below'} ${alert.price.toFixed(2)}
`).join('')}

Latest News

Monero Privacy Enhancements Coming in Next Update

The Monero development team has announced...

CryptoNews • 2 hours ago

Major Exchange Adds XMR Trading Pairs

Binance announced today they will be adding...

CoinDesk • 5 hours ago

Profit Calculator

XMR
USD
Current Value $---.--
Profit/Loss +$---.-- (--.--%)

Social Sentiment

72%

Positive mentions across social media

65% yesterday
+ (price * 0.99).toFixed(2), ' + price.toFixed(2)], round: 2, easing: 'easeOutQuad', duration: 1000 }); changeElement.innerHTML = ` ${Math.abs(change).toFixed(2)}% (24h) `; changeElement.className = `ml-2 mb-1 flex items-center ${isPositive ? 'text-green-400' : 'text-red-400'}`; } // Update chart with new data function updateChart(prices) { const labels = prices.map((_, i) => { const date = new Date(); date.setHours(date.getHours() - 24 + i/(prices.length/24)); return date.getHours() + ':00'; }); chart.data.labels = labels; chart.data.datasets[0].data = prices; chart.update(); } // Check alerts against current price function checkAlerts(currentPrice) { alerts.forEach(alert => { if ((alert.type === 'above' && currentPrice >= alert.price) || (alert.type === 'below' && currentPrice <= alert.price)) { if (!alert.triggered) { triggerAlert(alert); alert.triggered = true; } } else { alert.triggered = false; } }); localStorage.setItem('xmrAlerts', JSON.stringify(alerts)); } // Trigger an alert function triggerAlert(alert) { const notification = new Notification('Monero Alert', { body: `XMR price is now ${alert.type} ${alert.price}`, icon: '/static/favicon.ico' }); // Play sound const audio = new Audio('https://assets.mixkit.co/sfx/preview/mixkit-alarm-digital-clock-beep-989.mp3'); audio.play(); } // Initialize calculator functionality function initCalculator() { const xmrInput = document.querySelector('#calculator input:nth-of-type(1)'); const buyPriceInput = document.querySelector('#calculator input:nth-of-type(2)'); const calcBtn = document.querySelector('#calculator button'); const currentValueEl = document.querySelector('#calculator div:nth-of-type(3) span:nth-of-type(2)'); const profitEl = document.querySelector('#calculator div:nth-of-type(4) span:nth-of-type(2)'); calcBtn.addEventListener('click', () => { const xmrAmount = parseFloat(xmrInput.value); const buyPrice = parseFloat(buyPriceInput.value); if (isNaN(xmrAmount) || isNaN(buyPrice)) return; const currentValue = xmrAmount * currentPrice; const profit = currentValue - (xmrAmount * buyPrice); const profitPercent = (profit / (xmrAmount * buyPrice)) * 100; currentValueEl.textContent = `${currentValue.toFixed(2)}`; const isProfit = profit >= 0; profitEl.textContent = `${isProfit ? '+' : ''}${profit.toFixed(2)} (${isProfit ? '+' : ''}${profitPercent.toFixed(2)}%)`; profitEl.className = `font-medium ${isProfit ? 'text-green-400' : 'text-red-400'}`; }); } // Initialize alert functionality function initAlertSystem() { const addAlertBtn = document.querySelector('button:contains("Add New Alert")'); addAlertBtn.addEventListener('click', () => { const price = prompt('Enter price for alert:'); if (!price) return; const type = confirm('Alert when price is ABOVE this value? (OK for above, Cancel for below)') ? 'above' : 'below'; alerts.push({ price: parseFloat(price), type: type, triggered: false }); localStorage.setItem('xmrAlerts', JSON.stringify(alerts)); updateAlertsDisplay(); }); } // Update alerts display function updateAlertsDisplay() { const alertsContainer = document.querySelector('#alerts-container'); alertsContainer.innerHTML = ''; alerts.forEach((alert, index) => { const alertEl = document.createElement('div'); alertEl.className = 'flex items-center justify-between'; alertEl.innerHTML = ` ${alert.type === 'above' ? 'Above' : 'Below'} ${alert.price.toFixed(2)}
`; alertsContainer.appendChild(alertEl); }); } // Request notification permission if (Notification.permission !== 'granted') { Notification.requestPermission(); } // Initial data fetch fetchPriceData(); // Update every 60 seconds setInterval(fetchPriceData, 60000); // Initialize calculator and alerts document.addEventListener('DOMContentLoaded', () => { initCalculator(); initAlertSystem(); updateAlertsDisplay(); feather.replace(); });