Easy way to import list of stocks part of indexes

Hi,



Is there any easy way to import list of stocks which are part of Indexes like, NIFTY 50 or Bank NIFTY ? 



Thanks,

Abhishek

Hi Abhishek,



You can get the list from the NSE website and then loop through the tickers to get the data from yahoo finance using yfinance library. 



https://www.niftyindices.com/IndexConstituent/ind_nifty50list.csv



https://www.niftyindices.com/IndexConstituent/ind_niftybanklist.csv



Hope this helps!



Thanks,

Akshay

Thanks Akshay!