How manojk3535/openalgo works
OpenAlgo is a self-hosted algorithmic trading platform. Traders connect a broker, then submit orders through the unified API, hosted Python strategies, or visual Flow; Analyzer Mode can test workflows before live execution. Separate options analytics and real-time streaming support market analysis, while sandbox execution, portfolio/SIP backtesting, and operational tools provide additional capabilities. The README documents these product surfaces, and the excerpts show app registration, Flow service dependencies, broker-streaming management, and sandbox execution. Many route implementations and shared services were not sampled, so those links are omitted or marked unverified.
Main entry points: App.tsx Trading UI · broker Broker plugins · server.py WebSocket proxy · app.py Flask application
Components 21
User interfaces
- Trading UI
frontend/src/App.tsx - Unified API routes
blueprints/orders.py - Flow builder
blueprints/flow.py
Strategy execution
- Python strategy host
blueprints/python_strategy.py - Flow executor
services/flow_executor_service.py - Analyzer mode
blueprints/analyzer.py
Market and brokers
- Broker plugins
broker - WebSocket proxy
websocket_proxy/server.py - Connection pooling
websocket_proxy/connection_manager.py - Market data service
services/market_data_service.py
Analysis and simulation
- Options analytics
blueprints - Arbitrage scanner
blueprints/arbitrage.py - Portfolio backtest
portfolio/engine.py - SIP simulation
sip/engine.py - Sandbox execution
sandbox/execution_engine.py - Sandbox order manager
sandbox/order_manager.py
Platform services
- Sandbox database
database/sandbox_db.py - Authentication and sessions
database/auth_db.py - Flask application
app.py - MCP interfaces
blueprints/mcp_http.py
Other components
- Trader or client
Connections 25
- Trader or client → Trading UI: uses
- Trader or client → Unified API routes: submits orders
- Trader or client → Flow builder: builds strategies
- Trading UI → Python strategy host: hosts scripts
- Flow builder → Flow executor: executes flows
- Unified API routes → Analyzer mode: tests orders
- Python strategy host → Analyzer mode: tests orders
- Flow executor → Analyzer mode: tests orders
- Unified API routes → Broker plugins: executes via
- Python strategy host → Broker plugins: trades via
- Flow executor → Broker plugins: trades via
- Trading UI → Options analytics: views tools
- Options analytics → Broker plugins: reads broker data
- Trading UI → Portfolio backtest: opens backtest
frontend/src/App.tsx - Trading UI → SIP simulation: opens simulator
frontend/src/App.tsx - Trading UI → Arbitrage scanner: opens scanner
blueprints/arbitrage.py - WebSocket proxy → Connection pooling: uses pooling
websocket_proxy/server.py - WebSocket proxy → Broker plugins: dispatches feeds
websocket_proxy/server.py - WebSocket proxy → Market data service: uses market data
websocket_proxy/server.py - Sandbox execution → Sandbox order manager: executes orders
sandbox/order_manager.py - Sandbox order manager → Sandbox database: writes orders
sandbox/order_manager.py - Sandbox order manager → Sandbox execution: uses execution engine
sandbox/order_manager.py - Flask application → Authentication and sessions: checks sessions
app.py - Flask application → MCP interfaces: registers routes
app.py - Flask application → Trading UI: serves frontend
app.py