INNER CODE UNIT · Python

index

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

    async def index():
        """Serve the dashboard HTML."""
        return FileResponse(STATIC_DIR / 'index.html', media_type='text/html')

    @app.get('/live')
    async def live_dashboard():
        """Serve the live trading dashboard HTML."""
        return FileResponse(STATIC_DIR / 'live.html', media_type='text/html')

    @app.get('/api/state')
    async def get_state():
        """One-shot full state snapshot."""
        return JSONResponse(_serialize_snapshot(engine))

    @app.post('/api/command/{cmd}')
    async def send_command(cmd: str):
        """Execute a control command (pause/resume/stop)."""
        if cmd == 'pause':

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…