From 81a8982a89e629e75be2700b8745cfec3e001a99 Mon Sep 17 00:00:00 2001 From: Marc Blatter Date: Wed, 15 Jul 2026 11:02:58 +0200 Subject: [PATCH] Update: v0.32 - Improvements: Collapsible Holdings (4 decimals), Analytics with USD values, Mobile-optimized Stats --- src/web_dashboard.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/web_dashboard.py b/src/web_dashboard.py index a898292..01d3e93 100644 --- a/src/web_dashboard.py +++ b/src/web_dashboard.py @@ -80,12 +80,14 @@ async def history(hours: int = 24): usdts.append(round(u, 2)) return {'timestamps': ts_list, 'pnl_pcts': pcts, 'pnl_usdts': usdts, - 'current_pct': pcts[-1] if pcts else 0, 'min_pct': min(pcts) if pcts else 0, - 'max_pct': max(pcts) if pcts else 0, 'avg_pct': sum(pcts)/len(pcts) if pcts else 0} + 'current_pct': pcts[-1] if pcts else 0, 'current_usdt': usdts[-1] if usdts else 0, + 'min_pct': min(pcts) if pcts else 0, 'min_usdt': min(usdts) if usdts else 0, + 'max_pct': max(pcts) if pcts else 0, 'max_usdt': max(usdts) if usdts else 0, + 'avg_pct': sum(pcts)/len(pcts) if pcts else 0, 'avg_usdt': sum(usdts)/len(usdts) if usdts else 0} @app.get('/') async def dashboard(): - return HTMLResponse("""Trading Bot v0.32

🤖 Trading Bot v0.32

P&L Analytics

● LOADING
Portfolio
-
P&L
-
-
USDT
-
Trades
-

Holdings

📈 P&L Performance (Live)
Current
-
Min
-
Max
-
Avg
-
""") + return HTMLResponse("""Trading Bot v0.32

🤖 Trading Bot v0.32

P&L Analytics

● LOADING
Portfolio
-
P&L
-
-
USDT
-
Trades
-

Holdings

📈 P&L Performance (Live)
Current
-
-
Min
-
-
Max
-
-
Avg
-
-
""") if __name__ == '__main__': import uvicorn