INNER CODE UNIT · Python

DashboardServer

YichengYang-Ethan/oracle3 · oracle3/dashboard/server.py:380

class DashboardServer:
    """Manages the FastAPI dashboard server lifecycle.

    Runs uvicorn in a background thread so the main asyncio loop
    remains free for the TradingEngine.
    """

    def __init__(
        self,
        engine: 'TradingEngine',
        host: str = '0.0.0.0',
        port: int = 3000,
    ):
        self.engine = engine
        self.host = host
        self.port = port
        self._server_thread: threading.Thread | None = None
        self._uvicorn_server: Any = None

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…