Version 1.0.0 | Real-time and Historical Market Data for Indian Brokers
An advanced AmiBroker data plugin that seamlessly connects with OpenAlgo-supported Indian brokers, providing real-time streaming quotes and historical market data with intelligent caching and robust error handling.
EDUCATIONAL PURPOSE ONLY - NOT FOR LIVE TRADING
This plugin is provided FOR EDUCATIONAL AND RESEARCH PURPOSES ONLY. It is NOT intended, designed, or suitable for live trading or making real-time trading decisions.
- Data Source: All market data is sourced directly from brokers connected through the OpenAlgo platform
- No Data Guarantee: OpenAlgo, its maintainers, contributors, and team members make NO WARRANTIES OR GUARANTEES regarding:
- Accuracy of market data
- Completeness of market data
- Timeliness of data delivery
- Data integrity or reliability
- Continuity of data service
- No Liability: OpenAlgo, its maintainers, developers, contributors, and team are NOT LIABLE for:
- Any trading losses or financial damages
- Data errors, delays, or omissions
- System failures or interruptions
- Any decisions made based on this data
- Consequences of using this plugin for trading
- ✅ Permitted Use: Education, learning, backtesting, research, analysis
- ❌ Not Permitted: Live trading decisions, automated trading systems, real-money trading
- Verify All Data: Always verify data accuracy from official broker sources before any trading decision
- Use at Your Own Risk: You assume full responsibility for any use of this plugin
- No Trading Advice: This plugin does not provide trading advice or recommendations
- Consult Professionals: Consult with licensed financial advisors before trading
BY USING THIS PLUGIN, YOU ACKNOWLEDGE AND ACCEPT THESE TERMS.
The OpenAlgo AmiBroker Plugin bridges AmiBroker with the OpenAlgo platform, enabling traders to access live market data from multiple Indian brokers through a unified API. Built with performance and reliability in mind, it supports both WebSocket-based real-time streaming and HTTP API for historical data retrieval.
- Real-time Quote Streaming: WebSocket-based live market data with sub-second latency
- Historical Data Backfill: Intelligent data retrieval with automatic gap filling
- Mixed EOD/Intraday Support: Seamlessly combines daily and 1-minute data
- Multiple Exchanges: NSE, BSE, MCX, NFO, and other Indian exchanges
- Intraday & EOD Data: Full support for 1-minute and daily intervals
- Intelligent Caching: 5-second TTL quote cache for optimal performance
- Auto-Reconnection: Robust connection management with retry logic
- Duplicate Prevention: Smart timestamp matching prevents data duplication
- Sorted Data: Automatic chronological sorting for correct chart display
- Timestamp Normalization: Fixes "freak candle" issues during live updates
- Simple Configuration: Easy-to-use dialog with connection testing
- Visual Status Indicators: LED color-coded connection status
- WebSocket Testing: Built-in connection and subscription testing
- Clean Status Messages: User-friendly success/failure indicators
-
Freak Candles Fix (2025-01-23)
- Normalized seconds/milliseconds for 1-minute bars
- Prevents duplicate bars from appearing during live updates
- Location:
Plugin.cpp:708-717
-
Timestamp Sorting Fix (2025-01-23)
- Added automatic sorting after data merge
- Ensures proper chronological order
- Fixes mixed-up timestamps in Quote Editor
- Location:
Plugin.cpp:880-886
-
WebSocket Status Simplification (2025-01-23)
- Removed problematic Unicode characters
- Clean "successful" or "failed" messages
- No more garbled text in status display
- Location:
OpenAlgoConfigDlg.cpp:503-541
- AmiBroker: Version 6.0 or higher (64-bit recommended)
- Windows: 7/8/10/11 (64-bit)
- OpenAlgo Server: Latest version installed and running
- .NET Framework: 4.7.2 or higher
- Visual C++ Redistributable: 2019 or later
- Active internet connection
- Firewall access for HTTP/HTTPS (port 5000 or custom)
- Firewall access for WebSocket (ws:// or wss://)
- Active account with OpenAlgo-supported broker
- Valid API credentials from OpenAlgo platform
Download the latest OpenAlgo.dll from:
- GitHub Releases: OpenAlgo Plugin Releases
- OpenAlgo Website: https://openalgo.in
- Locate your AmiBroker installation directory (typically
C:\Program Files\AmiBroker) - Navigate to the
Pluginssubdirectory - Copy
OpenAlgo.dllto thePluginsfolder - Restart AmiBroker
- Open AmiBroker
- Go to File → Database Settings
- Click Configure next to the data source dropdown
- Select OpenAlgo Data Plugin
- Enter your configuration details:
- Server: Your OpenAlgo server URL (e.g.,
127.0.0.1or domain) - Port: API port (default:
5000) - API Key: Your OpenAlgo API key
- WebSocket URL: WebSocket endpoint (e.g.,
ws://127.0.0.1:8765) - Refresh Interval: Data refresh rate in seconds (default:
5) - Time Shift: Timezone adjustment in hours (default:
0)
- Server: Your OpenAlgo server URL (e.g.,
- Click Test Connection button to verify HTTP API connectivity
- Click Test WebSocket button to verify WebSocket connectivity
- Both tests should show "successful" status
- Click OK to save settings
- In AmiBroker, go to File → New → Database
- Enter database name (e.g., "OpenAlgo Data")
- Select OpenAlgo Data Plugin as data source
- Click Create
| Setting | Description | Example | Default |
|---|---|---|---|
| Server | OpenAlgo server hostname or IP | 127.0.0.1, api.example.com |
- |
| Port | HTTP API port number | 5000 |
5000 |
| API Key | Authentication key from OpenAlgo | your-api-key-here |
- |
| WebSocket URL | Full WebSocket URL including protocol | ws://127.0.0.1:8765 |
- |
| Setting | Description | Range | Default |
|---|---|---|---|
| Refresh Interval | How often to check for new data (seconds) | 1-3600 | 5 |
| Time Shift | Timezone adjustment (hours) | -48 to +48 | 0 |
The plugin supports all brokers integrated with OpenAlgo, including but not limited to:
- Zerodha (Kite API)
- Angel One (Angel One API)
- Upstox (Upstox API)
- Dhan (Dhan HQ API)
- Fyers (Fyers API v3)
- 5Paisa
- AliceBlue
- Finvasia (Shoonya)
- Flattrade
- IIFL
- Kotak Securities
- Mastertrust
- Motilal Oswal
- And more...
Note: Check the OpenAlgo documentation for the complete list of supported brokers.
- 1-minute (
1m): Intraday data for the last 30 days - Daily (
D): End-of-day data for up to 1 year
- Equity: NSE, BSE stocks
- Derivatives: NSE F&O (Futures & Options)
- Commodities: MCX commodities
- Currency: Currency futures
- Indices: NIFTY, BANKNIFTY, etc.
- Open, High, Low, Close (OHLC)
- Volume
- Open Interest (for F&O)
- Timestamp (Unix epoch)
- Right-click in the Symbol Tree
- Select New Symbol
- Enter symbol name in format:
SYMBOL-EXCHANGE- Example:
RELIANCE-NSE,NIFTY50-NSE,CRUDEOIL-MCX
- Example:
- Press
Ctrl+K(Quick Search) - Type symbol name
- If not found, AmiBroker will create it automatically
Use the format: SYMBOL-EXCHANGE
Examples:
- Equity:
TCS-NSE,INFY-NSE - Futures:
NIFTY25JANFUT-NFO,BANKNIFTY25JANFUT-NFO - Options:
NIFTY2552524000CE-NFO - Commodities:
CRUDEOIL25JANFUT-MCX,GOLD25FEBFUT-MCX
- Select a symbol from the Symbol Tree
- Chart will auto-load with historical data
- Right-click on chart → Parameters to change interval
- Available intervals: 1-minute, Daily
- AmiBroker will compress 1-minute data for 5m, 15m, 60m views
- Real-time data streams automatically via WebSocket
- Quote window shows live LTP (Last Traded Price)
- Charts update based on Refresh Interval setting
- Status LED (bottom-right) indicates connection status:
- Green: Connected and receiving data
- Yellow: Waiting to connect
- Red: Disconnected, will retry
- Purple: Manual reconnection required
Solutions:
- Verify OpenAlgo server is running
- Check server URL and port are correct
- Ensure firewall allows connections
- Test with
http://127.0.0.1:5000/api/v1/pingin browser
Solutions:
- Verify API key is correct (copy from OpenAlgo settings)
- Ensure no extra spaces in API key
- Check API key is active in OpenAlgo
Solutions:
- Check symbol format (must be
SYMBOL-EXCHANGE) - Verify broker supports the symbol
- Check market hours (some data only available during market)
- Use correct exchange code (NSE, BSE, MCX, NFO)
Solutions:
- Right-click symbol → Backfill to reload data
- Check if broker API has data for that period
- Verify date range (1m = 30 days max, Daily = 1 year)
Solutions:
- Fixed in v1.0.0 - Update to latest plugin version
- If issue persists, delete symbol and reload fresh data
- Check Quote Editor (Ctrl+Q) for timestamp sorting
Solutions:
- Verify WebSocket URL is correct
- Check WebSocket server is running
- Ensure protocol is
ws://(nothttp://) - Try
ws://127.0.0.1:8765if using localhost
Solutions:
- Check WebSocket connection status (LED indicator)
- Right-click status area → Reconnect
- Verify subscription in Plugin status window
- Restart AmiBroker to reinitialize connection
Solutions:
- Increase Refresh Interval to reduce server load
- Reduce number of symbols in watchlist
- Check network latency to OpenAlgo server
- Use local OpenAlgo installation instead of remote
POST /api/v1/ping
Content-Type: application/json
{
"apikey": "your-api-key"
}
POST /api/v1/history
Content-Type: application/json
{
"apikey": "your-api-key",
"symbol": "RELIANCE",
"exchange": "NSE",
"interval": "1m",
"start_date": "2025-01-01",
"end_date": "2025-01-23"
}
POST /api/v1/quotes
Content-Type: application/json
{
"apikey": "your-api-key",
"symbol": "RELIANCE",
"exchange": "NSE"
}
{
"action": "authenticate",
"api_key": "your-api-key"
}{
"action": "subscribe",
"symbol": "RELIANCE",
"exchange": "NSE",
"mode": 2
}{
"action": "unsubscribe",
"symbol": "RELIANCE",
"exchange": "NSE",
"mode": 2
}See BUILD_GUIDE.md for detailed build instructions.
- Install Visual Studio 2019 or later
- Open
OpenAlgoPlugin.sln - Select Release configuration
- Build Solution (F7)
- Output:
x64\Release\OpenAlgo.dll
- Technical Documentation: Deep dive into implementation
- Architecture: System design and components
- API Reference: Complete API documentation
- Build Guide: Developer setup and build instructions
- Changelog: Version history and fixes
- Troubleshooting: Common issues and solutions
- OpenAlgo Docs: https://docs.openalgo.in
- AmiBroker Docs: https://www.amibroker.com/guide/
- GitHub Issues: Report bugs and request features
- OpenAlgo Forum: Community discussions and support
- Discord: Real-time chat support
For commercial support and custom development, contact the OpenAlgo team.
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code style
- Add comments for complex logic
- Test thoroughly before submitting
- Update documentation for new features
This project is licensed under the MIT License - see LICENSE for details.
This software is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement.
THIS PLUGIN IS FOR EDUCATIONAL PURPOSES ONLY
- ❌ NOT for live trading or real-time trading decisions
- ❌ NOT a replacement for official broker platforms
- ❌ NOT verified or certified for trading accuracy
- ✅ ONLY for learning, research, and educational backtesting
Data Origin: All market data is sourced directly from brokers connected through OpenAlgo platform.
No Guarantee: OpenAlgo, its maintainers, developers, contributors, and team members:
- Make NO WARRANTIES about data accuracy, completeness, or timeliness
- Are NOT RESPONSIBLE for data quality, integrity, or reliability
- Do NOT VERIFY or validate broker-provided data
- Cannot guarantee continuous or uninterrupted data service
- Are NOT LIABLE for any data errors, delays, or omissions
- High Risk: Trading in financial markets involves substantial risk of loss
- Capital Loss: You may lose all your investment capital
- No Guarantees: Past performance does not guarantee future results
- Professional Advice: Consult licensed financial advisors before trading
- Own Risk: Only trade with capital you can afford to lose completely
- Risk Management: Always use proper risk management techniques
OpenAlgo, its maintainers, developers, contributors, and team are NOT responsible for:
- Any trading losses or financial damages
- Data inaccuracies, errors, delays, or omissions
- System failures, crashes, or interruptions
- Any decisions made based on data from this plugin
- Consequences of using this plugin for any purpose
- Third-party broker API failures or issues
- Network connectivity problems
- Any direct, indirect, incidental, or consequential damages
By using this plugin, you agree to:
- ✅ Use it for educational purposes only
- ✅ Verify all data from official broker sources before any trading decision
- ✅ Never rely solely on this plugin for trading decisions
- ✅ Accept full responsibility for all your trading decisions
- ✅ Understand that data may be delayed, incomplete, or inaccurate
- ✅ Test thoroughly in paper trading before any real use
- ✅ Maintain backups of all important data
- ✅ Consult professionals before making financial decisions
- This plugin does NOT provide trading advice, signals, or recommendations
- This plugin does NOT guarantee profitable trading
- This plugin is NOT a financial advisory service
- All trading decisions are your own responsibility
- Use of this plugin does not create any advisor-client relationship
- This plugin is not registered with any financial regulatory authority
- Consult your local laws and regulations regarding trading software
- Some features may not be legal in certain jurisdictions
BY INSTALLING, CONFIGURING, OR USING THIS PLUGIN, YOU ACKNOWLEDGE THAT YOU HAVE READ, UNDERSTOOD, AND ACCEPT ALL TERMS OF THIS DISCLAIMER.
- OpenAlgo Team: For the excellent broker integration platform
- AmiBroker: For the powerful charting and analysis platform
- Contributors: Everyone who has contributed code and feedback
- Community: For testing, bug reports, and feature suggestions
- Initial release with core functionality
- Fixed freak candles issue (timestamp normalization)
- Fixed timestamp sorting issue
- Simplified WebSocket status messages
- Comprehensive documentation
Made with ❤️ for the Indian Trading Community
For more information, visit OpenAlgo.in or AmiBroker.com