diff --git a/src/__pycache__/web_dashboard.cpython-310.pyc b/src/__pycache__/web_dashboard.cpython-310.pyc index 6241db7..c6ac24e 100644 Binary files a/src/__pycache__/web_dashboard.cpython-310.pyc and b/src/__pycache__/web_dashboard.cpython-310.pyc differ diff --git a/src/web_dashboard.py b/src/web_dashboard.py index 96b9ade..827ddb6 100644 --- a/src/web_dashboard.py +++ b/src/web_dashboard.py @@ -70,13 +70,10 @@ async def websocket_endpoint(websocket: WebSocket): # @app.get("/api/state") @app.get("/api/state") async def get_state(): - """Proxy to State Manager""" - try: - async with httpx.AsyncClient(timeout=3.0) as client: - resp = await client.get("http://localhost:7001/api/bot-state") - return resp.json() - except: - return trading_state + """Get current trading state from Bot DIRECTLY""" + # Return ONLY what the Bot currently has + # NO caching, NO fallback to stale data + return trading_state async def get_state(): """Get current trading state""" return trading_state