Bot auto-update: src/__pycache__/web_dashboard.cpython-310.pyc,src/web_dashboard.py

This commit is contained in:
Marc Blatter 2026-07-04 13:48:42 +02:00
parent e312565063
commit 5127e9f5b5
2 changed files with 1 additions and 10 deletions

View File

@ -69,16 +69,7 @@ async def websocket_endpoint(websocket: WebSocket):
@app.get("/api/state")
async def get_state():
"""Get current trading state from State Manager"""
try:
async with httpx.AsyncClient(timeout=2.0) as client:
resp = await client.get('http://localhost:8001/state')
if resp.status_code == 200:
return resp.json()
except Exception as e:
logger.warning(f"State Manager unavailable, using cached state: {e})")
# Fallback to cached state
"""Get current trading state"""
return trading_state