pratik141 / nsedt

Library to collect NSE data in pandas dataframe
http://nsedt.nse.pratikanand.co.in/
Apache License 2.0
33 stars 16 forks source link

ValueError: Retry again in a minute. #60

Open vardhannegi opened 3 months ago

vardhannegi commented 3 months ago

Describe the bug ValueError: Retry again in a minute.

To Reproduce Steps to reproduce the behavior:

from nsedt import equity as eq
from datetime import date
import pandas as pd
from datetime import datetime,timedelta

start_date= datetime.today() - timedelta(365)
end_date= datetime.today()
print(start_date.date())
print(end_date.date())

finalDF=pd.DataFrame()

for i,sym in enumerate(eq.get_symbols_list()):
    try:
        tempDF=eq.get_price(start_date, end_date, symbol=sym)[['Date','Close Price']]
        if finalDF.shape[0]==0:
            finalDF=pd.concat([finalDF,tempDF],axis=0)
        else:
            finalDF=pd.merge(finalDF,tempDF,how='left',on='Date')
    except Exception as e:
        print(f'ERROR for {i,sym}: ',e)

Expected behavior I was fetching one year data for all sym by for loop in a dataframe

Screen Short image.

Desktop (please complete the following information):

Additional Information NSE got my ip making too many request so I think they blocked my ip address is there any way to fake Ip address also?

pratik141 commented 1 week ago

not now