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,12 +70,9 @@ async def websocket_endpoint(websocket: WebSocket):
|
||||||
# @app.get("/api/state")
|
# @app.get("/api/state")
|
||||||
@app.get("/api/state")
|
@app.get("/api/state")
|
||||||
async def get_state():
|
async def get_state():
|
||||||
"""Proxy to State Manager"""
|
"""Get current trading state from Bot DIRECTLY"""
|
||||||
try:
|
# Return ONLY what the Bot currently has
|
||||||
async with httpx.AsyncClient(timeout=3.0) as client:
|
# NO caching, NO fallback to stale data
|
||||||
resp = await client.get("http://localhost:7001/api/bot-state")
|
|
||||||
return resp.json()
|
|
||||||
except:
|
|
||||||
return trading_state
|
return trading_state
|
||||||
async def get_state():
|
async def get_state():
|
||||||
"""Get current trading state"""
|
"""Get current trading state"""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue