All notable changes to the OpenAlgo Python Library will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
verboseparameter: Added verbosity control for WebSocket feed operations (LTP, Quote, Depth)verbose=False(default): Silent mode - no SDK output, only errorsverbose=Trueor1: Basic info - connection, auth, subscription statusverbose=2: Full debug - all market data updates from SDK
- Cleaner output format: Aligned log categories
[WS],[AUTH],[SUB],[LTP],[QUOTE],[DEPTH],[ERROR] - Trader-friendly logging: Concise, aligned output for easy troubleshooting
from openalgo import api
# Silent mode (default) - no SDK output
client = api(api_key="...", host="...", ws_url="...", verbose=False)
# Basic logging - connection/subscription info
client = api(api_key="...", host="...", ws_url="...", verbose=True)
# Full debug - all data updates
client = api(api_key="...", host="...", ws_url="...", verbose=2)[WS] Connected to ws://127.0.0.1:8765
[AUTH] Success | Broker: upstox | User: rajandran
[SUB] NSE_INDEX:NIFTY | Mode: Quote | Status: success
- Download ALL Exchanges:
instruments()now supports downloading all exchanges when no parameter is specifiedclient.instruments()- Downloads ALL exchanges and combines into single DataFrame- Downloads from: NSE, BSE, NFO, BFO, MCX, CDS, BCD, NSE_INDEX, BSE_INDEX
- Returns 148,000+ total instruments across all exchanges
- Gracefully handles exchanges that fail or return no data
- Backward compatible -
exchangeparameter still works for specific exchanges
- Fixed HTTP 400 Error: Removed
Content-Type: application/jsonheader from GET request- GET requests don't have a request body, so this header was causing server rejection
- Server was returning:
"The browser (or proxy) sent a request that this server could not understand"
- Updated
instruments()docstring with enhanced usage examples - Added documentation for ALL exchanges download feature
- Updated examples in documentation
- ALL Exchanges: Successfully retrieves 148,208 instruments from 8 exchanges
- NFO: 88,140 instruments (PE, CE, FUT)
- MCX: 26,375 instruments
- BSE: 12,698 instruments (EQ)
- CDS: 11,019 instruments
- BFO: 6,754 instruments
- NSE: 3,046 instruments (EQ)
- NSE_INDEX: 120 instruments
- BSE_INDEX: 56 instruments
- Specific Exchange: NSE, NFO, and other exchanges work correctly
- Returns clean pandas DataFrame with all instrument details
- CSV export functionality working correctly
# Download ALL exchanges (new feature!)
all_instruments = client.instruments()
print(f"Total instruments: {len(all_instruments)}") # 148,208+
# Filter by exchange from combined data
nse_only = all_instruments[all_instruments['exchange'] == 'NSE']
nfo_options = all_instruments[
(all_instruments['exchange'] == 'NFO') &
(all_instruments['instrumenttype'].isin(['CE', 'PE']))
]
# Download specific exchange (still supported)
nse_df = client.instruments(exchange="NSE")
nfo_df = client.instruments(exchange="NFO")
# Filter and analyze
equities = nse_df[nse_df['instrumenttype'] == 'EQ']
df.to_csv('nse_instruments.csv', index=False)-
instruments()function: Download all trading symbols and instruments with exchange-wise filtering- Returns data as pandas DataFrame for easy analysis and manipulation
- Supports filtering by exchange (NSE, BSE, NFO, BFO, BCD, CDS, MCX, NSE_INDEX, BSE_INDEX)
- Returns comprehensive instrument details: symbol, name, token, lot size, tick size, instrument type, etc.
- Enables quick symbol lookup, filtering, and export capabilities
-
syntheticfuture()function: Calculate synthetic futures price using ATM options- Implements synthetic future formula:
Strike Price + Call Premium - Put Premium - Automatically determines ATM strike from available options
- Useful for arbitrage opportunities and pricing verification
- Supports indices (NIFTY, BANKNIFTY) and equity stocks
- Returns underlying LTP, ATM strike, and calculated synthetic future price
- Implements synthetic future formula:
-
strike_intparameter: Made optional and marked for deprecation inoptionsorder()andoptionsymbol()- Now optional with default value
None - Deprecation warning issued when parameter is used
- Will be removed in future versions
- Now optional with default value
-
strategyparameter: Made optional and marked for deprecation inoptionsymbol()- Changed default from
"Python"toNone - Deprecation warning issued when parameter is used
- Will be removed in future versions
- Changed default from
from openalgo import api
client = api(api_key="your_key", host="http://127.0.0.1:5000")
# Download all NSE instruments
nse_df = client.instruments(exchange="NSE")
print(f"Total NSE instruments: {len(nse_df)}")
# Filter for equities only
equities = nse_df[nse_df['instrumenttype'] == 'EQ']
# Calculate synthetic future price
synthetic = client.syntheticfuture(
underlying="NIFTY",
exchange="NSE_INDEX",
expiry_date="28NOV25"
)
print(f"Synthetic Future: {synthetic['synthetic_future_price']}")
print(f"Spot Price: {synthetic['underlying_ltp']}")
print(f"Basis: {synthetic['synthetic_future_price'] - synthetic['underlying_ltp']}")- Added proper deprecation warnings using Python's
warningsmodule - Backward compatible - existing code continues to work with warnings
- Enhanced documentation for new functions
- Improved error handling for GET requests in Data API
This release delivers massive performance improvements and achieves 100% indicator functionality through comprehensive optimization.
- 🎯 PERFECT SUCCESS: 100% Indicator Coverage - All 103 technical indicators now working flawlessly
- 🚀 Major Performance Improvements:
- Ichimoku: 4600% faster execution (1.4s → 0.03s)
- ZLEMA: 54% better scaling ratio (104× → 48×)
- MODE: Optimized binning algorithm implementation
- NATR: Vectorized operations for linear performance
- ⚡ O(n) Algorithm Implementation: Linear complexity for critical indicators
- 🛠️ Consolidated Utilities: Unified EMA, ATR, SMA, STDEV kernels across all modules
- 🔧 Numba JIT Optimization: Consistent compilation with caching for maximum performance
- DEMA/TEMA: Resolved missing
_calculate_emamethod with consolidated utility integration - RVI: Fixed parameter signature to properly handle OHLC data (open, high, low, close, period)
- ckstop: Resolved Numba compilation issue by replacing class method calls
- true_range: Corrected parameter count (high, low, close)
- roc_oscillator: Fixed to single parameter interface
- Consistent API: Perfect
from openalgo import tausage pattern - Memory Optimization: Linear scaling maintained across all dataset sizes
- Production Ready: Sub-millisecond performance for typical trading datasets
- Code Quality: Eliminated redundant implementations and improved maintainability
- Average Execution: 4.5ms per indicator (10K dataset)
- Best Performance: 0.022ms for fastest indicators
- System Capacity: 20,000+ indicators/second for medium datasets
- Scaling: Linear O(n) behavior for all optimized indicators
This release brings complete technical analysis capabilities to the OpenAlgo Python Library with 100% functional technical indicators.
- Complete Technical Indicators Library: All 102 technical analysis functions now working perfectly
- High-Performance Implementation: NumPy and Numba optimization for fast calculations
- TradingView-like Syntax: Easy-to-use
ta.function()interface - Comprehensive Coverage:
- 19 Trend Indicators: SMA, EMA, Supertrend, Ichimoku, HMA, etc.
- 9 Momentum Indicators: RSI, MACD, Stochastic, CCI, Williams %R, etc.
- 18 Volatility Indicators: ATR, Bollinger Bands, Keltner Channels, etc.
- 13 Volume Indicators: OBV, VWAP, MFI, ADL, CMF, etc.
- 20 Oscillators: ROC, TRIX, Awesome Oscillator, PPO, etc.
- 8 Statistical Indicators: Correlation, Beta, Linear Regression, etc.
- 11 Hybrid Indicators: ADX, Aroon, Pivot Points, SAR, etc.
- 5 Utility Functions: Crossover/Crossunder detection, Highest/Lowest, etc.
- Parameter Signature Issues: Fixed 4 indicators with incorrect parameter counts
alligator(): Fixed parameter signature to use single data inputgator_oscillator(): Corrected parameter count and removed unnecessary shift parametersfractals(): Removed incorrect period parameterzigzag(): Added missing close parameter
- Numba Compilation Issues: Resolved 5 indicators with self-reference compilation errors
vidya(): Inlined CMO calculation to remove self-referencervol(): Fixed RVI class confusion and parameter signaturechandelier_exit(): Inlined ATR calculation to remove self-referencestochrsi(): Inlined RSI calculation to remove self-referencechop(): Inlined ATR sum calculation to remove self-reference
- RWI Implementation: Fixed undefined class reference error
- FUNCTION_ABBREVIATIONS_LIST.md: Updated with all 102 correct function names and abbreviations
- FINAL_INDICATOR_VALIDATION_REPORT.md: Complete validation report showing 100% success rate
- Comprehensive Testing: All indicators validated with generated test data
- Input Flexibility: All indicators accept numpy arrays, pandas Series, or Python lists
- Output Consistency: Returns same format as input (numpy/pandas preservation)
- Error Handling: Robust validation for periods, data length, and parameter ranges
- Performance Optimized: Numba JIT compilation for mathematical operations
- Memory Efficient: Optimized array operations and memory usage
from openalgo import ta
import numpy as np
# Sample price data
close = np.array([100, 101, 99, 102, 98, 105, 107, 103, 106, 108])
high = close * 1.02
low = close * 0.98
volume = np.random.randint(1000, 5000, len(close))
# Trend indicators
sma_20 = ta.sma(close, 20)
ema_50 = ta.ema(close, 50)
supertrend, direction = ta.supertrend(high, low, close, 10, 3)
# Momentum indicators
rsi = ta.rsi(close, 14)
macd_line, signal_line, histogram = ta.macd(close, 12, 26, 9)
# Volatility indicators
atr = ta.atr(high, low, close, 14)
upper, middle, lower = ta.bbands(close, 20, 2)
# Volume indicators
obv = ta.obv(close, volume)
vwap = ta.vwap(high, low, close, volume)
# Oscillators
stoch_k, stoch_d = ta.stochastic(high, low, close, 14, 3)
williams_r = ta.williams_r(high, low, close, 14)
# Utility functions
cross_above = ta.crossover(close, sma_20)
cross_below = ta.crossunder(close, sma_20)- Success Rate: 100% (102/102 indicators working)
- Test Coverage: Comprehensive validation with synthetic and real market data
- Performance: Optimized for high-frequency trading applications
- Reliability: Production-ready with extensive error handling
- Core trading API functionality
- WebSocket market data feeds
- Order management system
- Account operations