METALS
AuOroLoading…
AgPlata
PtPlatino
PdPaladio
RhRodio
🛢Oil (WTI)
AuOro
AgPlata
PtPlatino
PdPaladio
RhRodio
🛢Oil (WTI)

☕ Invitar un café

Enjoying this Plata analysis? Support further development with a coffee!

Your support helps maintain and improve this Plata analysis tool. Thank you! ❤️
Payment processed securely via PayPal as a donation.

Ag Precio de la Plata Hoy (XAG/USD)

Live spot price · Historical charts · Inflation-adjusted price · Industrial demand · Physical buy calculator

Precio en Vivo 18 Divisas Gráfico 5 Años Siempre Gratis
NEWS
Cargando las últimas noticias del mercado de la plata…
Ag
Precio al Contado de la Plata (XAG/USD) · LIVE
Loading…
per troy oz · Actualizado cada 5 min · Fuente: Yahoo Finance
EUR
GBP
CHF
JPY
CAD
CNY
Precio de la Plata en Todas las Unidades
per troy oz (31.1035 g)
por gramo
por kilogramo
por tola (11.664 g)
Oro / Plata Ratio
15 : 1
Historical average (ancient Rome)
Current signal
Gráfico del Precio de la Plata (USD/oz)
Período Máximo
Período Mínimo
Variación
Máximo Histórico
$49.51 (1980)
Precio de la Plata Ajustado por Inflación (USD Real)

Real price in 2024 USD, adjusted for US CPI. Note: Plata's 1980 ATH of $49.51 equals ~$180 in today's money. Source: US Bureau of Labor Statistics / Plata Institute.

Estacionalidad de la Plata – Rendimiento Mensual Promedio (2015–2024)

Average monthly return based on 10-year historical data. Plata is more volatile than gold. Past performance is not indicative of future results.

Plata Industrial Demand by Sector (2025)
Sector Demand (Moz) Share
☀️Photovoltaics (Solar)232 Moz
💡Electronics & Electrical198 Moz
🚗Automotive (EVs)87 Moz
🏥Medical & Biocides42 Moz
🔋Brazing & Soldering55 Moz
💎Jewellery & Plataware194 Moz
📈Physical Investment243 Moz

Source: Plata Institute – World Plata Survey 2025. Total demand: ~1,051 Moz. Solar demand grew +64% since 2022 driven by global PV installations.

Tenencias de ETFs de Plata
iShares Plata Trust
SLV · NYSE
~14,800 t
▲ +4.1% YTD
Aberdeen Plata ETF
SIVR · NYSE
~1,120 t
▲ +2.8% YTD
WisdomTree Plata
PHAG · LSE
~4,200 t
▲ +3.5% YTD
Xtrackers Plata ETC
XAD5 · XETRA
~890 t
▼ -0.6% YTD

ETF holdings as of Feb 2026. Source: Plata Institute / ETF providers. Holdings in metric tonnes. Total silver ETF holdings globally: ~22,000 t.

Calculadora de Compra Física de Plata

¿Cuánta plata física puede comprar? Ingrese un monto y elija su divisa.

Ag Plata (troy oz)
Au Oro equivalent
ℹ️ Rate info
Monedas y Lingotes de Plata – Estimated Retail Prices

Estimated retail prices including typical dealer premiums. Actual prices may vary.

Preguntas Frecuentes – Precio de la Plata
¿Cuál es el precio de la plata hoy?
The current silver spot price (XAG/USD) is displayed live at the top of this page, updated every 5 minutes from Yahoo Finance (COMEX Plata Futures, SI=F). Plata is quoted in USD por onza troy and automatically converted to EUR, GBP, CHF and 15 other currencies using real-time exchange rates.
Why is silver used in solar panels?
Plata is the best electrical conductor of all metals and is essential for solar panel manufacturing. Each standard photovoltaic (PV) panel requires approximately 15–20 gramos of silver for its electrical contacts and busbars. With global solar installations exceeding 500 GW annually, the solar industry now consumes over 230 million onzas troy of silver per year – making it the single largest industrial consumer of silver.
What is the gold/silver ratio and what does it mean?
The gold/silver ratio shows how many ounces of silver are needed to buy one ounce of gold. A ratio above 80 historically suggests silver is undervalued relative to gold. The ratio peaked at 120 during the COVID-19 crash in March 2020. Historically, the ratio averaged around 15–16 (the Roman standard), but in modern markets it typically trades between 60–100. Many precious metals investors use a high ratio as a signal to shift from gold to silver.
How much silver can I buy for €1,000?
Use the physical buy calculator above to see exactly how many gramos or onzas troy of silver you can buy for any amount in any currency at the current live spot price. Note that physical silver (coins and bars) is sold at a premium of 5–20% above the spot price, depending on the product.
¿Cuál es la diferencia entre precio spot y precio minorista?
The spot price is the current market price for immediate delivery of one troy ounce of pure silver. When you buy physical silver (coins or bars) from a dealer, you pay the spot price plus a premium (typically 5–12% for large bars, 10–25% for coins). Plata premiums are generally higher than gold premiums as a percentage because the absolute price is lower and production costs are relatively higher. The coin and bar prices shown above are estimates based on typical premiums.
Will silver reach $100?
Some analysts argue that silver is significantly undervalued relative to gold and its industrial importance. For silver to have historically reached $100/oz, it would need to roughly triple from current levels. Factors that could drive such a move include: a major expansion in solar energy demand, a significant decline in mine supply, a sharp fall in the gold/silver ratio back toward historical norms, or a broad precious metals bull market. However, silver is highly volatile and past price targets have often not been met on schedule.

Precio de la Plata Hoy — Precio al Contado en Vivo y Análisis

Numexo.io proporciona el precio de la plata en tiempo real (XAG/USD), actualizado cada 5 minutos. La plata es a la vez un metal precioso y un metal industrial, con aproximadamente el 50% de la demanda proveniente de aplicaciones industriales, incluyendo paneles solares, electrónica y vehículos eléctricos.

Historial del Precio de la Plata

La plata alcanzó su máximo histórico de 49,50 $/oz en abril de 2011, durante una fuerte demanda especulativa. En 2024–2026, los precios de la plata se han beneficiado del crecimiento de las energías renovables, siendo la plata un componente esencial de las células fotovoltaicas. El ratio oro/plata, que mide cuántas onzas de plata se necesitan para comprar una onza de oro, es un indicador clave de la valoración relativa.

Demanda Industrial de Plata

A diferencia del oro, cuya demanda está principalmente impulsada por la inversión y la joyería, la plata se beneficia de una demanda industrial creciente. Los paneles solares utilizan aproximadamente 20 gramos de plata por unidad, y la transición energética mundial debería sostener la demanda de plata durante las próximas décadas.

`; }).join(''); } // ── LIGHTWEIGHT CHARTS ────────────────────────────────────────── // Historical silver los datos de precios (XAG/USD) const DATA_90D = [{"time":"2025-12-03","value":30.45},{"time":"2025-12-04","value":30.89},{"time":"2025-12-05","value":30.22},{"time":"2025-12-08","value":30.67},{"time":"2025-12-09","value":31.12},{"time":"2025-12-10","value":30.78},{"time":"2025-12-11","value":31.34},{"time":"2025-12-12","value":31.89},{"time":"2025-12-15","value":32.12},{"time":"2025-12-16","value":32.45},{"time":"2025-12-17","value":32.78},{"time":"2025-12-18","value":32.34},{"time":"2025-12-19","value":31.98},{"time":"2025-12-22","value":33.12},{"time":"2025-12-23","value":33.45},{"time":"2025-12-24","value":33.78},{"time":"2025-12-26","value":34.01},{"time":"2025-12-29","value":33.67},{"time":"2025-12-30","value":33.34},{"time":"2025-12-31","value":32.89},{"time":"2026-01-02","value":33.45},{"time":"2026-01-05","value":33.78},{"time":"2026-01-06","value":33.34},{"time":"2026-01-07","value":33.89},{"time":"2026-01-08","value":34.23},{"time":"2026-01-09","value":34.56},{"time":"2026-01-12","value":34.89},{"time":"2026-01-13","value":35.23},{"time":"2026-01-14","value":35.56},{"time":"2026-01-15","value":35.89},{"time":"2026-01-16","value":36.23},{"time":"2026-01-19","value":36.56},{"time":"2026-01-20","value":36.89},{"time":"2026-01-21","value":37.45},{"time":"2026-01-22","value":37.12},{"time":"2026-01-23","value":37.56},{"time":"2026-01-26","value":37.89},{"time":"2026-01-27","value":38.12},{"time":"2026-01-28","value":38.45},{"time":"2026-01-29","value":38.78},{"time":"2026-01-30","value":39.01},{"time":"2026-02-02","value":39.34},{"time":"2026-02-03","value":39.67},{"time":"2026-02-04","value":39.89},{"time":"2026-02-05","value":40.12},{"time":"2026-02-06","value":40.34},{"time":"2026-02-09","value":40.56},{"time":"2026-02-10","value":40.89},{"time":"2026-02-11","value":41.12},{"time":"2026-02-12","value":41.34},{"time":"2026-02-13","value":41.56},{"time":"2026-02-16","value":41.78},{"time":"2026-02-17","value":42.01},{"time":"2026-02-18","value":42.23},{"time":"2026-02-19","value":42.45},{"time":"2026-02-20","value":42.67},{"time":"2026-02-23","value":42.89},{"time":"2026-02-24","value":43.12},{"time":"2026-02-25","value":43.34},{"time":"2026-02-26","value":43.56},{"time":"2026-02-27","value":42.78},{"time":"2026-03-02","value":43.21}]; const DATA_1Y = [{"time":"2025-03-03","value":31.45},{"time":"2025-03-10","value":31.89},{"time":"2025-03-17","value":32.34},{"time":"2025-03-24","value":32.78},{"time":"2025-03-31","value":33.12},{"time":"2025-04-07","value":33.56},{"time":"2025-04-14","value":33.89},{"time":"2025-04-21","value":34.23},{"time":"2025-04-28","value":34.56},{"time":"2025-05-05","value":34.89},{"time":"2025-05-12","value":32.45},{"time":"2025-05-19","value":32.78},{"time":"2025-05-26","value":33.12},{"time":"2025-06-02","value":33.45},{"time":"2025-06-09","value":33.78},{"time":"2025-06-16","value":34.01},{"time":"2025-06-23","value":34.34},{"time":"2025-06-30","value":34.67},{"time":"2025-07-07","value":34.89},{"time":"2025-07-14","value":35.12},{"time":"2025-07-21","value":35.34},{"time":"2025-07-28","value":35.56},{"time":"2025-08-04","value":35.78},{"time":"2025-08-11","value":36.01},{"time":"2025-08-18","value":36.23},{"time":"2025-08-25","value":36.45},{"time":"2025-09-01","value":36.67},{"time":"2025-09-08","value":36.89},{"time":"2025-09-15","value":37.12},{"time":"2025-09-22","value":37.34},{"time":"2025-09-29","value":37.56},{"time":"2025-10-06","value":37.78},{"time":"2025-10-13","value":38.01},{"time":"2025-10-20","value":38.23},{"time":"2025-10-27","value":38.45},{"time":"2025-11-03","value":38.67},{"time":"2025-11-10","value":38.89},{"time":"2025-11-17","value":30.12},{"time":"2025-11-24","value":30.45},{"time":"2025-12-01","value":30.45},{"time":"2025-12-08","value":30.67},{"time":"2025-12-15","value":32.12},{"time":"2025-12-22","value":33.12},{"time":"2025-12-29","value":33.67},{"time":"2026-01-05","value":33.78},{"time":"2026-01-12","value":34.89},{"time":"2026-01-19","value":36.56},{"time":"2026-01-26","value":37.89},{"time":"2026-02-02","value":39.34},{"time":"2026-02-09","value":40.56},{"time":"2026-02-16","value":41.78},{"time":"2026-02-23","value":42.89},{"time":"2026-03-02","value":43.21}]; const DATA_5Y = [{"time":"2021-01-04","value":27.11},{"time":"2021-02-01","value":26.53},{"time":"2021-03-01","value":25.78},{"time":"2021-04-01","value":25.34},{"time":"2021-05-03","value":27.45},{"time":"2021-06-01","value":26.12},{"time":"2021-07-01","value":25.67},{"time":"2021-08-02","value":23.89},{"time":"2021-09-01","value":22.45},{"time":"2021-10-01","value":23.12},{"time":"2021-11-01","value":23.78},{"time":"2021-12-01","value":22.34},{"time":"2022-01-03","value":22.89},{"time":"2022-02-01","value":23.45},{"time":"2022-03-01","value":25.12},{"time":"2022-04-01","value":24.67},{"time":"2022-05-02","value":22.34},{"time":"2022-06-01","value":21.89},{"time":"2022-07-01","value":18.45},{"time":"2022-08-01","value":19.12},{"time":"2022-09-01","value":18.78},{"time":"2022-10-03","value":19.34},{"time":"2022-11-01","value":20.12},{"time":"2022-12-01","value":23.45},{"time":"2023-01-02","value":23.89},{"time":"2023-02-01","value":22.34},{"time":"2023-03-01","value":22.78},{"time":"2023-04-03","value":25.12},{"time":"2023-05-01","value":24.67},{"time":"2023-06-01","value":23.12},{"time":"2023-07-03","value":24.45},{"time":"2023-08-01","value":23.89},{"time":"2023-09-01","value":23.34},{"time":"2023-10-02","value":22.78},{"time":"2023-11-01","value":23.45},{"time":"2023-12-01","value":24.12},{"time":"2024-01-02","value":23.78},{"time":"2024-02-01","value":22.89},{"time":"2024-03-02","value":24.45},{"time":"2024-04-02","value":27.34},{"time":"2024-05-02","value":31.45},{"time":"2024-06-02","value":29.78},{"time":"2024-07-02","value":29.12},{"time":"2024-08-02","value":28.67},{"time":"2024-09-02","value":30.45},{"time":"2024-10-02","value":32.12},{"time":"2024-11-02","value":31.45},{"time":"2024-12-02","value":30.89},{"time":"2025-01-02","value":30.34},{"time":"2025-02-02","value":31.78},{"time":"2025-03-02","value":31.45},{"time":"2025-04-02","value":33.12},{"time":"2025-05-02","value":34.89},{"time":"2025-06-02","value":33.45},{"time":"2025-07-02","value":34.89},{"time":"2025-08-02","value":35.78},{"time":"2025-09-02","value":36.67},{"time":"2025-10-02","value":38.01},{"time":"2025-11-02","value":38.67},{"time":"2025-12-02","value":30.45},{"time":"2026-01-02","value":33.45},{"time":"2026-02-02","value":39.34},{"time":"2026-03-02","value":43.21}]; function getChartDataForTF(tf) { const today = new Date(); if (tf === '1W') { const cutoff = new Date(today); cutoff.setDate(cutoff.getDate() - 7); return DATA_90D.filter(d => new Date(d.time) >= cutoff); } if (tf === '1M') { const cutoff = new Date(today); cutoff.setMonth(cutoff.getMonth() - 1); return DATA_90D.filter(d => new Date(d.time) >= cutoff); } if (tf === '3M') return DATA_90D; if (tf === '1Y') return DATA_1Y; if (tf === '5Y') return DATA_5Y; return DATA_90D; } function initChart() { const container = document.getElementById('silverChart'); if (!container || typeof LightweightCharts === 'undefined') return; lwChart = LightweightCharts.createChart(container, { width: container.clientWidth, height: 340, layout: { background: { color: 'transparent' }, textColor: '#94a3b8' }, grid: { vertLines: { color: 'rgba(255,255,255,0.04)' }, horzLines: { color: 'rgba(255,255,255,0.04)' } }, crosshair: { mode: LightweightCharts.CrosshairMode.Normal }, rightPriceScale: { borderColor: 'rgba(255,255,255,0.1)' }, timeScale: { borderColor: 'rgba(255,255,255,0.1)', timeVisible: true }, }); lwSeries = lwChart.addAreaSeries({ lineColor: '#cbd5e1', topColor: 'rgba(203,213,225,0.25)', bottomColor: 'rgba(203,213,225,0.02)', lineWidth: 2, priceFormat: { type: 'price', precision: 2, minMove: 0.01 }, }); loadChartTF('3M'); window.addEventListener('resize', () => { if (lwChart) lwChart.applyOptions({ width: container.clientWidth }); }); document.querySelectorAll('.tf-btn').forEach(btn => { btn.addEventListener('click', () => { document.querySelectorAll('.tf-btn').forEach(b => b.classList.remove('active')); btn.classList.add('active'); currentTF = btn.dataset.tf; loadChartTF(currentTF); }); }); } function loadChartTF(tf) { const data = getChartDataForTF(tf); if (!data || data.length === 0) return; lwSeries.setData(data); lwChart.timeScale().fitContent(); // Stats const values = data.map(d => d.value); const high = Math.max(...values); const low = Math.min(...values); const first = data[0].value; const last = data[data.length - 1].value; const pct = ((last - first) / first) * 100; const sign = pct >= 0 ? '+' : ''; document.getElementById('chartHigh').textContent = fmt(high); document.getElementById('chartLow').textContent = fmt(low); const chEl = document.getElementById('chartChange'); chEl.textContent = `${sign}${pct.toFixed(2)}%`; chEl.className = `chart-stat-value ${pct >= 0 ? 'up' : 'down'}`; } // ── INFLATION CHART (Chart.js) ────────────────────────────────── function initInflationChart() { const ctx = document.getElementById('inflationChart'); if (!ctx) return; // Plata inflation-adjusted price (real 2024 USD) const labels = ['2000','2002','2004','2006','2008','2010','2012','2014','2016','2018','2020','2022','2024','2026*']; const nominal = [4.95, 4.60, 6.67, 11.55, 14.99, 20.19, 31.15, 15.68, 17.14, 14.96, 24.44, 21.73, 28.50, 43.21]; const real = [8.92, 7.82, 10.45, 16.89, 20.48, 27.65, 40.12, 19.67, 20.95, 17.45, 27.48, 21.73, 28.50, 43.21]; new Chart(ctx, { type: 'line', data: { labels, datasets: [ { label: 'Nominal (USD/oz)', data: nominal, borderColor: '#cbd5e1', backgroundColor: 'rgba(203,213,225,0.08)', borderWidth: 2, pointRadius: 2, fill: true, tension: 0.3, }, { label: 'Real (2024 USD)', data: real, borderColor: '#06b6d4', backgroundColor: 'rgba(6,182,212,0.05)', borderWidth: 2, borderDash: [5,3], pointRadius: 2, fill: false, tension: 0.3, } ] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { labels: { color: '#94a3b8', font: { size: 11 }, boxWidth: 14 } }, tooltip: { mode: 'index', intersect: false } }, scales: { x: { ticks: { color: '#64748b', font: { size: 10 } }, grid: { color: 'rgba(255,255,255,0.04)' } }, y: { ticks: { color: '#64748b', font: { size: 10 }, callback: v => '$' + v.toLocaleString() }, grid: { color: 'rgba(255,255,255,0.04)' } } } } }); } // ── SEASONALITY CHART (Chart.js) ──────────────────────────────── function initSeasonalityChart() { const ctx = document.getElementById('seasonalityChart'); if (!ctx) return; const months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; // Plata seasonality (more volatile than gold) const values = [2.3, 2.8, -0.6, 1.2, -1.4, 0.8, -1.2, 3.1, 1.8, -2.1, 0.5, 1.4]; const colors = values.map(v => v >= 0 ? 'rgba(16,185,129,0.75)' : 'rgba(239,68,68,0.75)'); new Chart(ctx, { type: 'bar', data: { labels: months, datasets: [{ label: 'Avg. Monthly Return (%)', data: values, backgroundColor: colors, borderRadius: 4, }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false }, tooltip: { callbacks: { label: ctx => `${ctx.parsed.y >= 0 ? '+' : ''}${ctx.parsed.y.toFixed(1)}%` } } }, scales: { x: { ticks: { color: '#64748b', font: { size: 10 } }, grid: { display: false } }, y: { ticks: { color: '#64748b', font: { size: 10 }, callback: v => v + '%' }, grid: { color: 'rgba(255,255,255,0.04)' }, suggestedMin: -3, suggestedMax: 4 } } } }); } // ── NEWS TICKER ───────────────────────────────────────────────── async function loadNews() { const staticNews = [ 'Plata surges to multi-year high above $43 driven by solar demand boom', 'Plata Institute: Global silver demand hits record 1,051 Moz in 2025', 'Solar industry now largest single consumer of silver – 232 Moz in 2025', 'Oro/Plata ratio falls below 125 – historical pattern observed in early 2026 (not a recommendation)', 'Electric vehicle production drives silver demand for battery contacts', 'Plata supply deficit widens for fourth consecutive year – Plata Institute', 'India silver imports surge to record as investors seek gold alternative', 'WisdomTree: Plata ETF inflows accelerate amid green energy transition', 'Plata price por gramo crosses €1.30 for first time in European markets', 'Mexico and Peru silver output declines; supply concerns mount', ]; const lang = window.location.pathname.startsWith('/de/') ? 'de' : window.location.pathname.startsWith('/fr/') ? 'fr' : window.location.pathname.startsWith('/es/') ? 'es' : 'en'; try { const res = await fetch(`/assets/data/news_proxy.php?feed=silver&lang=${lang}`, { signal: AbortSignal.timeout(5000) }); if (res.ok) { const data = await res.json(); if (data.items && data.items.length > 0) { renderNews(data.items.map(i => i.title)); return; } } } catch(e) {} renderNews(staticNews); } function renderNews(headlines) { const inner = document.getElementById('newsTickerInner'); if (!inner) return; const html = headlines.map(h => `${h}` ).join(''); inner.innerHTML = html + html; const totalChars = headlines.join('').length; const duration = Math.max(40, Math.min(90, totalChars * 0.05)); inner.style.animationDuration = duration + 's'; } // ── FAQ ACCORDION ─────────────────────────────────────────────── document.querySelectorAll('.faq-question').forEach(q => { q.addEventListener('click', () => { const item = q.closest('.faq-item'); const wasOpen = item.classList.contains('open'); document.querySelectorAll('.faq-item').forEach(i => i.classList.remove('open')); if (!wasOpen) item.classList.add('open'); }); }); // ── LANG DROPDOWN ─────────────────────────────────────────────── const langBtn = document.getElementById('langButton'); const langDrop = document.getElementById('langDropdown'); langBtn.addEventListener('click', e => { e.stopPropagation(); langDrop.classList.toggle('active'); }); document.addEventListener('click', () => langDrop.classList.remove('active')); // ── API HELPERS ───────────────────────────────────────────────── function getYesterdayStr() { const d = new Date(); d.setDate(d.getDate() - 1); if (d.getDay() === 0) d.setDate(d.getDate() - 2); if (d.getDay() === 6) d.setDate(d.getDate() - 1); return d.toISOString().split('T')[0]; } async function fetchFawazPrice(code) { const url = `https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1/currencies/${code.toLowerCase()}.json`; const res = await fetch(url, { signal: AbortSignal.timeout(8000) }); if (!res.ok) throw new Error('API error'); const data = await res.json(); return data[code.toLowerCase()]['usd']; } async function fetchFawazPriceYesterday(code) { const url = `https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@${getYesterdayStr()}/v1/currencies/${code.toLowerCase()}.json`; try { const res = await fetch(url, { signal: AbortSignal.timeout(8000) }); if (!res.ok) return null; const data = await res.json(); return data[code.toLowerCase()]['usd']; } catch { return null; } } async function fetchFrankfurterRates() { const CURRENCIES = 'AUD,BRL,CAD,CHF,CNY,CZK,DKK,EUR,GBP,HUF,INR,JPY,MXN,NOK,PLN,SEK,TRY,USD'; const res = await fetch(`https://api.frankfurter.dev/v1/latest?base=USD&symbols=${CURRENCIES}`, { signal: AbortSignal.timeout(8000) }); if (!res.ok) throw new Error('Frankfurter error'); const data = await res.json(); fxRates = { USD: 1, ...data.rates }; } async function fetchYahooPrices() { const proxyUrl = '/assets/data/yahoo_prices.php'; try { const res = await fetch(proxyUrl, { signal: AbortSignal.timeout(6000) }); if (!res.ok) throw new Error('proxy error'); const data = await res.json(); if (data.success && data.prices) return data.prices; } catch (e) { /* fallback below */ } return null; } // ── MAIN API FETCH ────────────────────────────────────────────── async function loadAllData() { try { // Yahoo Finance proxy (Plata, Oro, Platino, Paladio, Oil) const yahooPrices = await fetchYahooPrices(); let yahooPlata = null, yahooOro = null, yahooPlatino = null, yahooPaladio = null, yahooOil = null; if (yahooPrices) { if (yahooPrices.silver) yahooPlata = yahooPrices.silver.price; if (yahooPrices.gold) yahooOro = yahooPrices.gold.price; if (yahooPrices.platinum) yahooPlatino = yahooPrices.platinum.price; if (yahooPrices.palladium) yahooPaladio = yahooPrices.palladium.price; if (yahooPrices.oil) yahooOil = yahooPrices.oil; } // Fawazahmed0 fallback const [silverT, goldT, platinumT, palladiumT, silverYT, goldYT] = await Promise.allSettled([ yahooPlata ? Promise.resolve(yahooPlata) : fetchFawazPrice('XAG'), yahooOro ? Promise.resolve(yahooOro) : fetchFawazPrice('XAU'), yahooPlatino ? Promise.resolve(yahooPlatino) : fetchFawazPrice('XPT'), yahooPaladio ? Promise.resolve(yahooPaladio) : fetchFawazPrice('XPD'), fetchFawazPriceYesterday('XAG'), fetchFawazPriceYesterday('XAU'), ]); await fetchFrankfurterRates(); silverPrice = silverT.status === 'fulfilled' ? silverT.value : null; goldPrice = goldT.status === 'fulfilled' ? goldT.value : null; const platinumPrice = platinumT.status === 'fulfilled' ? platinumT.value : null; const palladiumPrice = palladiumT.status === 'fulfilled' ? palladiumT.value : null; silverPriceYesterday = silverYT.status === 'fulfilled' ? silverYT.value : null; const goldYesterday = goldYT.status === 'fulfilled' ? goldYT.value : null; // Update source label let srcLabel = 'fawazahmed0 API'; let updateInterval = '15 min'; if (yahooPlata) { srcLabel = 'Yahoo Finance (COMEX)'; updateInterval = '5 min'; } const srcEl = document.getElementById('priceSource'); if (srcEl) srcEl.textContent = `per troy oz · Updated every ${updateInterval} · Source: ${srcLabel}`; // Update oil price if (yahooOil && typeof yahooOil === 'object') { OIL_LIVE_PRICE = yahooOil.price || OIL_LIVE_PRICE; OIL_LIVE_CHANGE_PCT = yahooOil.change_pct || OIL_LIVE_CHANGE_PCT; OIL_LIVE_CHANGE_NOM = yahooOil.change || OIL_LIVE_CHANGE_NOM; } // Rodio: static fallback (no free API) const rhodiumPrice = 4800; const rhodiumYesterday = 4750; // Update all UI components if (silverPrice) { updatePriceHero(silverPrice, silverPriceYesterday); updateUnits(silverPrice); updateCoins(silverPrice); updateCalculator(); } if (goldPrice) updateRatio(); updateTicker({ gold: goldPrice, goldY: goldYesterday, silver: silverPrice, silverY: silverPriceYesterday, platinum: platinumPrice, platinumY: null, palladium: palladiumPrice, palladiumY: null, rhodium: rhodiumPrice, rhodiumY: rhodiumYesterday, }); // Update live chart with latest price if (silverPrice && lwSeries) { const today = new Date().toISOString().split('T')[0]; try { lwSeries.update({ time: today, value: silverPrice }); } catch(e) {} } } catch (err) { console.error('loadAllData error:', err); } } // ── INIT ──────────────────────────────────────────────────────── document.addEventListener('DOMContentLoaded', () => { initChart(); initInflationChart(); initSeasonalityChart(); loadAllData(); loadNews(); setInterval(loadAllData, 5 * 60 * 1000); setInterval(loadNews, 30 * 60 * 1000); // ── BOOKMARK BUTTON ── document.getElementById('bookmarkBtn').addEventListener('click', () => { if (window.sidebar && window.sidebar.addPanel) { window.sidebar.addPanel(document.title, window.location.href, ''); } else if (window.external && ('AddFavorite' in window.external)) { window.external.AddFavorite(window.location.href, document.title); } else { const isMac = navigator.platform.toUpperCase().includes('MAC'); const key = isMac ? '⌘' : 'Ctrl'; alert(`Press ${key}+D to bookmark this page.`); } }); // ── COFFEE MODAL ── const coffeeModal = document.getElementById('coffeeModal'); const coffeeClose = document.getElementById('coffeeClose'); const coffeeDonateBtn = document.getElementById('coffeeDonateBtn'); let selectedCoffeeAmount = 3.00; let selectedCoffeeDescription = 'One Coffee'; document.getElementById('coffeeBtn').addEventListener('click', () => { coffeeModal.classList.add('active'); document.body.style.overflow = 'hidden'; }); coffeeClose.addEventListener('click', () => { coffeeModal.classList.remove('active'); document.body.style.overflow = 'auto'; }); coffeeModal.addEventListener('click', (e) => { if (e.target === coffeeModal) { coffeeModal.classList.remove('active'); document.body.style.overflow = 'auto'; } }); document.querySelectorAll('.coffee-amount').forEach(btn => { btn.addEventListener('click', () => { document.querySelectorAll('.coffee-amount').forEach(b => b.classList.remove('active')); btn.classList.add('active'); selectedCoffeeAmount = parseFloat(btn.dataset.amount); const counts = {3: 'One Coffee', 9: 'Three Coffees', 15: 'Five Coffees'}; selectedCoffeeDescription = counts[selectedCoffeeAmount] || 'Coffee'; coffeeDonateBtn.textContent = `Donate $${selectedCoffeeAmount.toFixed(2)} via PayPal`; }); }); coffeeDonateBtn.addEventListener('click', (e) => { e.preventDefault(); const paypalEmail = 'paypal@scopewire.de'; const amount = selectedCoffeeAmount.toFixed(2); const itemName = encodeURIComponent(`Donation for Numexo Plata Analysis: ${selectedCoffeeDescription}`); const currency = 'USD'; const paypalLink = `https://www.paypal.com/send?money=${amount}¤cy_code=${currency}&from=website&email=${encodeURIComponent(paypalEmail)}&item_name=${itemName}`; window.open(paypalLink, '_blank', 'noopener,noreferrer'); setTimeout(() => { alert(`Thank you for your support! ❤️\nYou will be redirected to PayPal to complete your $${amount} donation to ${paypalEmail}.`); }, 500); }); });