INNER CODE UNIT · Python

shutdown

flukelaster/ai-trading-agent · mt5_bridge/main.py:107

async def shutdown():
    mt5.shutdown()
    logger.info("MT5 shutdown")


# --- Endpoints ---
@app.get("/health")
async def health():
    connected = mt5.terminal_info() is not None
    account = None
    if connected:
        info = mt5.account_info()
        if info:
            account = {"login": info.login, "server": info.server}
    return {"status": "ok" if connected else "disconnected", "mt5": account}


@app.get("/tick/{symbol}", dependencies=[Depends(verify_api_key)])

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…