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

This commit is contained in:
Marc Blatter 2026-07-04 14:45:46 +02:00
parent b42b06bc5d
commit f8d028a3a5
2 changed files with 4 additions and 7 deletions

View File

@ -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