{"id":24122,"library":"nsepython","title":"nsepython","description":"nsepython is a Python library that provides an interface to NSE India APIs, allowing users to fetch stock quotes, indices, derivatives, and other market data. The version is 2.97 with ongoing updates. Release cadence is irregular but frequent.","status":"active","version":"2.97","language":"python","source_language":"en","source_url":"https://github.com/aeron7/nsepython","tags":["nse","india","stock-market","api"],"install":[{"cmd":"pip install nsepython","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP requests to NSE API","package":"requests","optional":false}],"imports":[{"note":"nsequote is not a top-level module; must be imported from nsepython","wrong":"import nsequote","symbol":"nsequote","correct":"from nsepython import nsequote"},{"note":"nsefetch is directly under nsepython, not a submodule","wrong":"from nsepython.nsefetch import nsefetch","symbol":"nsefetch","correct":"from nsepython import nsefetch"}],"quickstart":{"code":"from nsepython import nsequote\nquote = nsequote('INFY')\nprint(quote)","lang":"python","description":"Fetch stock quote for INFY"},"warnings":[{"fix":"Use `from nsepython import nsequote`.","message":"In v2.0, the import path changed from `nsepython.nsequote` to `nsepython`. Old code using `from nsepython.nsequote import nsequote` will break.","severity":"breaking","affected_versions":">=2.0"},{"fix":"Add delays between requests (e.g., `time.sleep(0.5)`).","message":"NSE API rate limiting: frequent requests may lead to temporary IP bans or CAPTCHA blocks.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace `nseget` with `nsefetch`.","message":"The function `nseget` is deprecated in favor of `nsefetch`.","severity":"deprecated","affected_versions":">=2.8"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `from nsepython import nsequote`.","cause":"Trying to import nsequote directly without using nsepython package.","error":"ImportError: No module named 'nsequote'"},{"fix":"Use proper symbol format, e.g., 'INFY' or 'INFY.NS'.","cause":"Symbol not found or incorrect format (e.g., missing '.NS' for NSE stocks).","error":"ValueError: Invalid symbol"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}