Openalgo
Open Source Algo Trading Platform for Everyone
Install / Use
/learn @marketcalls/OpenalgoREADME
OpenAlgo - Open Source Algorithmic Trading Platform
<div align="center"> </div>What is OpenAlgo?
OpenAlgo is a free, open source, self hosted algorithmic trading platform that bridges your trading ideas with real execution. Built with Python Flask and a modern React frontend, it provides a unified API layer across 30+ Indian brokers, enabling seamless automation from Amibroker, TradingView, GoCharting, N8N, Python, Java, Go, .NET, Node.js, ChartInk, MetaTrader, Excel, and Google Sheets. Traders can also receive strategy alerts directly on Telegram, ensuring real time visibility and control.
Beyond execution, OpenAlgo empowers traders to completely own their trading infrastructure. Traders can effortlessly build algorithmic strategies, indicators, and custom trading dashboards using AI agentic coding tools, connect with their favorite trading platforms, and deploy strategies without being tied to any single broker or vendor. By standardizing broker APIs into one consistent trading layer, OpenAlgo allows strategies to work the same way across brokers, making automation faster, scalable, and fully under the trader’s control.
Video Tutorial
Quick Links
- Documentation: docs.openalgo.in
- Installation Guide: Getting Started
- Upgrade Guide: Upgrade Instructions
- Why OpenAlgo: Why Build with OpenAlgo
Python Compatibility
Supports Python 3.11, 3.12, 3.13, and 3.14
Supported Brokers (30+)
<details> <summary>View All Supported Brokers</summary>- 5paisa (Standard + XTS)
- AliceBlue
- AngelOne
- Compositedge
- Definedge
- Delta Exchange
- Dhan (Live + Sandbox)
- Firstock
- Flattrade
- Fyers
- Groww
- IBulls
- IIFL
- Indmoney
- JainamXTS
- Kotak Neo
- Motilal Oswal
- Mstock
- Nubra
- Paytm Money
- Pocketful
- RMoney
- Samco
- Shoonya (Finvasia)
- Tradejini
- Upstox
- Wisdom Capital
- Zebu
- Zerodha
All brokers share a unified API interface, making it easy to switch between brokers without changing your code.
Core Features
Unified REST API Layer (/api/v1/)
A single, standardized API across all brokers with 30+ endpoints:
- Order Management: Place, modify, cancel orders, basket orders, smart orders with position sizing
- Portfolio: Get positions, holdings, order book, trade book, funds
- Market Data: Real-time quotes, historical data, market depth (Level 5), symbol search
- Advanced: Option Greeks calculator, margin calculator, synthetic futures, auto-split orders
Real-Time WebSocket Streaming
- Unified WebSocket proxy server for all brokers (port 8765)
- Common WebSocket implementation using ZMQ for normalized data across brokers
- Subscribe to LTP, Quote, or Market Depth for any symbol
- ZeroMQ-based message bus for high-performance data distribution
- Automatic reconnection and failover handling
Flow Visual Strategy Builder
Build trading strategies visually without writing code:
- Node-based editor powered by xyflow/React Flow
- Pre-built nodes: Market data, conditions, order execution, notifications
- Real-time execution with live market data
- Webhook triggers for TradingView and external signals
- Visual debugging with execution flow highlighting
API Analyzer Mode
Complete testing environment with ₹1 Crore virtual capital:
- Test strategies with real market data without risking money
- Pre-deployment testing for strategy validation
- Supports all order types (Market, Limit, SL, SL-M)
- Realistic margin system with leverage
- Auto square-off at exchange timings
- Separate database for complete isolation
Action Center
Order approval workflow for manual control:
- Auto Mode: Immediate order execution (for personal trading)
- Semi-Auto Mode: Manual approval required before broker execution
- Complete audit trail with IST timestamps
- Approve individual orders or bulk approve all
Python Strategy Manager
Host and run Python strategies directly on OpenAlgo:
- Built-in code editor powered by CodeMirror with Python syntax highlighting
- Run multiple strategies in parallel with process isolation
- Automated scheduling with IST-based start/stop times
- Secure environment variable management with encryption
- Real-time logs and state persistence
- No need for external servers or hosting
ChartInk Integration
Direct webhook integration for scanner alerts:
- Supports BUY, SELL, SHORT, COVER actions
- Intraday with auto square-off and positional strategies
- Bulk symbol configuration via CSV
- Real-time strategy monitoring
AI-Powered Trading (MCP Server)
Connect AI assistants for natural language trading:
- Compatible with Claude Desktop, Cursor, Windsurf, ChatGPT
- Execute trades using natural language commands
- Full trading capabilities: orders, positions, market data
- Local and secure integration with your OpenAlgo instance
Telegram Bot Integration
Real-time notifications and command execution:
- Automatic order and trade alerts delivered to Telegram
- Get orderbook, positions, holdings, funds on demand
- Generate intraday and daily charts
- Interactive button-based menu
- Receive strategy alerts directly to Telegram
- Secure API key encryption
Advanced Monitoring Tools
Latency Monitor: Track order execution performance and round-trip times across brokers
Traffic Monitor: API usage analytics, error tracking, and endpoint statistics
PnL Tracker: Real-time profit/loss with interactive charts powered by TradingView Lightweight Charts
Traffic & Latency Monitor Documentation
Enterprise-Grade Security
Password Security: Argon2 hashing (Password Hashing Competition winner)
Token Encryption: Fernet symmetric encryption with PBKDF2 key derivation
Two-Factor Authentication: TOTP support with authenticator apps
Rate Limiting: Configurable limits for login, API, orders, webhooks
Manual IP Ban System: Monitor and ban suspicious IPs via /security dashboard
Browser Protection: CSP headers, CORS rules, CSRF protection, secure headers, secure sessions
SQL Injection Prevention: SQLAlchemy ORM with parameterized queries
Privacy First: Zero data collection policy - your data stays on your server
Modern React Frontend
- React 19 with TypeScript for type-safe, maintainable code
- shadcn/ui components with Tailwind CSS 4.0 for beautiful, accessible UI
- TanStack Query for efficient server state management and caching
- Zustand for lightweight client state management
- Real-time updates via Socket.IO (orders, trades, positions, logs)
- CodeMirror for Python and JSON editing with syntax highlighting and themes
- xyflow/React Flow for visual Flow strategy builder
- TradingView Lightweight Charts for P&L and market data visualization
- Light and Dark themes with 8 accent colors
- Mobile-friendly responsive design
Supported Platforms
Connect your algo strategies and run from any platform:
- Amibroker - Direct integration with AFL scripts
- TradingView - Webhook alerts for Pine Script strategies
- GoCharting - Webhook integration
- N8N - Workflow automation
- Python - Official SDK with 100+ technical indicators
- GO - REST API integration
- Node.js - JavaScript/TypeScript library
- ChartInk - Scanner webhook integration
- MetaTrader - Compatible with MT4/MT5
- Excel - REST API + upcoming Add-in
- Google Sheets - REST API integration
Receive your strategy alerts directly to Telegram for all platforms.
Technology Stack
Backend
- Flask 3.0 - Python web framework
- SQLAlchemy 2.0 - Database ORM
- Flask-SocketIO - Real-time WebSocket communication
- ZeroMQ - High-performance message bus
- Argon2-CFFI - Password hashing
- Cryptography - Fernet encryption for tokens
Frontend
- React 19 - UI library
- TypeScript - Type-safe JavaScript
- Vite 7 - Fast build tool
- Tailwind CSS 4 - Utility-first CSS framework
- shadcn/ui - Component library built on Radix UI
- TanStack Query - Server state management
- Zustand - Client state management
Data Visualization & Editors
- TradingView Lightweight Charts - Financial charts
- CodeMirror - Code editor for strategies
- xyflow/React Flow - Visual Flow builder
- Lucide React - Icon library
Testing & Quality
- Vitest - Unit testing
- Playwright - E2E testing
- Biome - Linting and formatting
- axe-core - Accessibility testing
Databases
- SQLite - 4 separate databases (main, logs, latency, sandbox)
- DuckDB - Historical market data (Historify)
Official SDKs
OpenAlgo provides officially supported client libraries for application development and system-level integrations:
| Language / Platform | R

