Bot auto-update: src/__pycache__/web_dashboard.cpython-310.pyc,src/web_dashboard.py
This commit is contained in:
parent
e312565063
commit
5127e9f5b5
Binary file not shown.
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue