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