RESEARCH_ONLY · PAPER_TRADING_ONLY · PUBLIC_MARKET_DATA_ONLY · USD_ONLY · NO_REAL_ORDER_CAPABILITY

Program Loops

Every significant loop or lifecycle in the system, with its trigger and source file.

LoopTriggerSource
FastAPI startup lifecycleProcess startservices/ml-api/app.py
Desktop bootstrapApp launchapps/desktop/src-tauri/src/main.rs (bootstrap_app)
Authentication/session lifecycleLogin/idle timeoutsrc/research_terminal/auth.py
Frontend polling loop20s interval while a screen is activeapps/desktop/src/hooks/useDesktopRuntime.ts
Public-stream reconnect loopWebsocket disconnectsrc/market_data/
Live-monitor event loopContinuous, closed-candle drivenscripts/run_live_paper_monitor.py
Heartbeat loopEvery 15s (config/live_paper_monitor.yaml)config/live_paper_monitor.yaml
Recovery loopStale lock detectedscripts/run_live_paper_monitor.py (--force-recover-stale-lock)
Graceful shutdown sequenceStop signalconfig/live_paper_monitor.yaml (shutdown_poll_seconds)