How marketcalls/openchart works
OpenChart is a Python client for NSE India market data. The main workflow accepts a symbol, segment, date range, and interval; searches NSE for the symbol’s token and metadata; requests historical chart data; then converts the response into an indexed OHLCV DataFrame. Callers with a known token can bypass symbol search. The library also exposes symbol search and supported segment/timeframe lists. The graph reflects the sampled runtime source and README; the NSE endpoints are external services.
Main entry points: core.py Historical lookup · utils.py OHLCV formatter
Components 13
Client API
- NSEData client
openchart/core.py - Segments and timeframes
openchart/core.py
Symbol and Data Retrieval
- Cookie bootstrap
openchart/core.py - Symbol search
openchart/core.py - Historical lookup
openchart/core.py - Direct-token lookup
openchart/core.py - Chart data request
openchart/core.py
Data Formatting
- OHLCV formatter
openchart/utils.py
Other components
- Python caller
- NSE symbol API
- NSE chart API
- NSE website
- OHLCV DataFrame
Connections 16
- Python caller → NSEData client: uses
README.md - NSEData client → Segments and timeframes: lists
README.md - Symbol search → Cookie bootstrap: ensures cookies
openchart/core.py - Historical lookup → Cookie bootstrap: ensures cookies
openchart/core.py - Direct-token lookup → Cookie bootstrap: ensures cookies
openchart/core.py - Historical lookup → Symbol search: resolves symbol
openchart/core.py - Symbol search → NSE symbol API: posts search
openchart/core.py - Cookie bootstrap → NSE website: gets cookies
openchart/core.py - Historical lookup → Chart data request: fetches data
openchart/core.py - Direct-token lookup → Chart data request: fetches data
openchart/core.py - Chart data request → NSE chart API: posts request
openchart/core.py - Chart data request → OHLCV formatter: formats response
openchart/core.py - OHLCV formatter → OHLCV DataFrame: returns frame
openchart/utils.py - Python caller → Symbol search: searches symbols
README.md - Python caller → Historical lookup: requests history
README.md - Python caller → Direct-token lookup: requests by token
README.md