How santhosh144awc/openbull works
OpenBull is a self-hosted options-trading platform for Indian markets. Users configure a broker, inspect live market data and options analytics, then place orders or build and run strategies in Live or Sandbox mode. The backend exposes both a typed external API and session-authenticated web features, with broker plugins and a shared streaming proxy. Sandbox execution, strategy runtime, persistence, and caching are important internal layers. The README documents the main capabilities; several subsystem paths below are directory-level because their individual implementations were not sampled.
Main entry points: sandbox_service.py Sandbox Service · engine.py Strategy Engine · execution_engine.py Sandbox Execution · trading_mode_service.py Trading Mode
Components 24
User Experience
- Web App
frontend/src/App.tsx - API Clients
frontend/src/api
API and Analytics
- Web Routes
backend/routers - Trading API
backend/api - Options Analytics
backend/services - Market Data
backend/services/market_data_service.py
Trading Runtime
- Broker Plugins
backend/broker - Broker Services
backend/services - Trading Mode
backend/services/trading_mode_service.py - Sandbox Service
backend/services/sandbox_service.py - Sandbox Execution
backend/sandbox/execution_engine.py - Sandbox Orders
backend/sandbox/order_manager.py - Sandbox Positions
backend/sandbox/position_manager.py - Strategy Webhooks
backend/strategy/webhook_handler.py - Strategy Engine
backend/strategy/engine.py - Strategy Scheduler
backend/strategy/scheduler.py
Platform Services
- WebSocket Proxy
backend/websocket_proxy/server.py - Market Data Cache
backend/services/market_data_cache.py - Redis Cache
backend/utils/redis_client.py - PostgreSQL
backend/database.py - Strategy Events
backend/events/strategy_events.py
Other components
- Trader
- Broker Systems
- TradingView
Connections 29
- Trader → Web App: uses
README.md - Web App → API Clients: requests through
README.md - API Clients → Web Routes: calls web API
README.md - API Clients → Trading API: calls trading API
README.md - Web Routes → Options Analytics: serves analytics
README.md - Trading API → Options Analytics: serves analytics
README.md - Trading API → Trading Mode: dispatches by mode
README.md - Web Routes → Trading Mode: dispatches by mode
README.md - Trading Mode → Broker Services: routes live calls
README.md - Trading Mode → Sandbox Service: routes sandbox calls
README.md - Broker Services → Broker Plugins: uses broker adapters
README.md - Broker Plugins → Broker Systems: connects to
README.md - Broker Plugins → WebSocket Proxy: publishes market data
README.md - WebSocket Proxy → Market Data Cache: feeds ticks
backend/websocket_proxy/server.py - Market Data → Market Data Cache: uses shared cache
README.md - Sandbox Service → Sandbox Execution: starts execution
backend/services/sandbox_service.py - Sandbox Execution → Sandbox Orders: fills orders
backend/sandbox/execution_engine.py - Sandbox Execution → Sandbox Positions: applies fills
backend/sandbox/execution_engine.py - Sandbox Execution → Market Data Cache: subscribes to ticks
backend/sandbox/execution_engine.py - Sandbox Service → Sandbox Orders: manages orders
backend/services/sandbox_service.py - Sandbox Service → Sandbox Positions: manages positions
backend/services/sandbox_service.py - TradingView → Strategy Webhooks: sends signals
README.md - Strategy Webhooks → Strategy Engine: dispatches actions
backend/strategy/webhook_handler.py - Strategy Scheduler → Strategy Engine: runs strategies
backend/strategy/scheduler.py - Strategy Engine → Strategy Events: emits events
backend/strategy/engine.py - Strategy Engine → Sandbox Service: places sandbox orders
backend/strategy/engine.py - Market Data Cache → Redis Cache: optional cache
backend/services/market_data_cache.py - Sandbox Service → PostgreSQL: persists sandbox state
backend/services/sandbox_service.py - Strategy Engine → PostgreSQL: stores strategy state
backend/strategy/engine.py