NSEpy Library

I installed NSEpy library to fetch historical data from NSE. However, getting blank or empty data. Tried for many scripts. What would be the reason. Is there any other library for fetching the data from NSE

Hi Rakesh,
NSEpy seems to be deprecated. Check out its GitHub page —users have reported that it’s no longer working as expected. You can try alternative libraries like yfinance or nselib. Again, these are third-party data providers, so they may run into errors occasionally as well. Check their GitHub pages to stay updated on ongoing issues. If you’re not getting the specific data you need, let me know what type of data you’re looking for.

Thanks’ Rishikesh. I wanted to get historical data and work out with the course content of quantra. As the jupyter notebook files have US stocks. Tried nselib, however the historical data doesn’t get retrieved ( using deliverable_position_data).
The problem with yfinance is that you need to know the code which are suffixed with .ns.

Hi Rakesh,
yfinance works for most of the applications discussed in the courses and supports most Indian stocks. However, you need to append .NS for NSE-listed stocks or .BO for BSE-listed stocks, depending on the exchange. Since most of these libraries are essentially wrappers, they may not always function as expected. If you’re looking for more reliable historical data, you might want to explore the paid data services provided by NSE.
Let me know if this answers your question or if you need any further clarification. Feel free to check out this free course on getting market data—it covers retrieving data across different domains, including stocks, crypto, news, and fundamentals.