Bot auto-update: src/__pycache__/web_dashboard.cpython-310.pyc,src/web_dashboard.py
This commit is contained in:
parent
22c557421b
commit
b41d00bc4c
Binary file not shown.
|
|
@ -519,23 +519,23 @@ html_content = """
|
|||
// Update key metrics - CHF PRIMARY, USD secondary
|
||||
const usdt = data.balance.USDT || 0;
|
||||
const usdt_chf = usdt * 0.84;
|
||||
document.getElementById('usdt').textContent = `CHF ${usdt_chf.toFixed(2)} / $${usdt.toFixed(2)}`;
|
||||
document.getElementById('usdt').textContent = `$${usdt.toFixed(2)} / CHF ${usdt_chf.toFixed(2)}`;
|
||||
|
||||
const portfolio_usd = data.portfolio_value_usd || 0;
|
||||
const portfolio_chf = data.portfolio_value_chf || (portfolio_usd * 0.84);
|
||||
document.getElementById('portfolio').textContent = `CHF ${portfolio_chf.toFixed(2)} / $${portfolio_usd.toFixed(2)}`;
|
||||
document.getElementById('portfolio').textContent = `$${portfolio_usd.toFixed(2)} / CHF ${portfolio_chf.toFixed(2)}`;
|
||||
|
||||
// Update P&L with color - CHF primary
|
||||
const dailyPnl = data.daily_pnl || 0;
|
||||
const dailyPnl_chf = dailyPnl * 0.84;
|
||||
const dailyPnlEl = document.getElementById('daily-pnl');
|
||||
dailyPnlEl.textContent = `CHF ${dailyPnl_chf >= 0 ? '+' : ''}${dailyPnl_chf.toFixed(2)} / $${dailyPnl >= 0 ? '+' : ''}${dailyPnl.toFixed(2)}`;
|
||||
dailyPnlEl.textContent = `$${dailyPnl >= 0 ? '+' : ''}${dailyPnl.toFixed(2)} / CHF ${dailyPnl_chf >= 0 ? '+' : ''}${dailyPnl_chf.toFixed(2)}`;
|
||||
dailyPnlEl.className = 'card-value ' + (dailyPnl >= 0 ? 'positive' : 'negative');
|
||||
|
||||
const totalPnl = data.total_pnl || 0;
|
||||
const totalPnl_chf = totalPnl * 0.84;
|
||||
const totalPnlEl = document.getElementById('total-pnl');
|
||||
totalPnlEl.textContent = `CHF ${totalPnl_chf >= 0 ? '+' : ''}${totalPnl_chf.toFixed(2)} / $${totalPnl >= 0 ? '+' : ''}${totalPnl.toFixed(2)}`;
|
||||
totalPnlEl.textContent = `$${totalPnl >= 0 ? '+' : ''}${totalPnl.toFixed(2)} / CHF ${totalPnl_chf >= 0 ? '+' : ''}${totalPnl_chf.toFixed(2)}`;
|
||||
totalPnlEl.className = 'card-value ' + (totalPnl >= 0 ? 'positive' : 'negative');
|
||||
|
||||
// Update performance
|
||||
|
|
|
|||
Loading…
Reference in New Issue