INNER CODE UNIT · Python

shutdown

GifariKemal/xaubot-ai · web-dashboard/api/main.py:89

async def shutdown():
    db.close_pool()


# ─── Status Endpoints ───

@app.get("/api/status")
async def get_status():
    """Get current trading status from bot's status file."""
    for path in [STATUS_FILE, Path("data/bot_status.json")]:
        if path.exists():
            try:
                data = json.loads(path.read_text())
                return data
            except (json.JSONDecodeError, OSError):
                continue

    now = datetime.now(ZoneInfo("Asia/Jakarta"))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…