Fetch Top Gainers & Losers Symbol from NSE’s Website

Follow the Video Properly for Instructions then go for the Code Above.

Choose CMD and Go for Installation Type pip install nsetools and hit Enter.

Gainers are those stocks list which we derive after they outperform other stocks same as we do with Losers side but they are not performing side especially we do check this in intraday and if you want to check the list you can visit nseindia otherwise you can have trading account in aliceblue for better vision,trading and analysis via python API to open an account please follow the link and click Alice Blue.



from nsetools import Nse
from pprint import pprint
import pandas as pd
nse=Nse()
Gainers=nse.get_top_gainers()
Gainers=pd.DataFrame(Gainers)
Losers=nse.get_top_losers()
Losers=pd.DataFrame(Losers)
BUY=[x for x in Gainers['symbol']]
SELL=[x for x in Losers['symbol']]
for x in range(len(BUY)):
    print(BUY[x])
for x in range(len(SELL)):
    print(SELL[x])


If you want to Extract Historical Data from NSE’s Website Please Follow Link NSEpy Historical Data