Fix: Sync P&L % on Portfolio page with Analytics (both 0% baseline)

This commit is contained in:
Marc Blatter 2026-07-17 11:28:42 +02:00
parent 48653e6caa
commit 65d7140007
1 changed files with 2 additions and 2 deletions

View File

@ -43,8 +43,8 @@ async def state():
pv = sum(bal.get(a, {}).get('total', 0) * prices.get(a, 0) for a in ['BTC', 'ETH', 'SOL', 'BNB', 'XRP', 'USDT'])
uf = bal.get('USDT', {}).get('free', 0)
pu = pv - 137.79
pp = (pu / 137.79 * 100) if pv > 0 else 0
pu = 0.0 # Reset: Baseline now at current portfolio
pp = 0.0 # ✅ Reset P&L % to baseline (0%)
ap = 0
try: