nsepy
nsepy copied to clipboard
get_history command returns empty datasets
I am trying to get historical data from 2019-03-07 to 2019-04-16 for nifty 50 stocks and some indices. However each time it's returning just an empty dataframe. Any particular reasons why is it behaving so. My whole code is bulid up on this as a base , so its a bit urgent . Please fix it asap.
I tried to debug it, and get_history is not returning anything after "2019-01-28".
In my experience it returns empty dataframe only if NSE has blocked your IP because of multiple hits. Can you check if they blocked your IP ? Can you open the website on a browser ? If no, then reboot your modem, perhaps your ip will get refreshed. A few recommendations to avoid this. Try adding a delay in every hit if you are running loops. Prevent duplicate hits if your code has it by downloading one scrip data and keeping the data in temp folders, etc etc.
@sanjoyforever Do you know when NSE gonna block the IP. I am planning to download daily EOD price data of more than 400 stocks from there. Do you have any recommendations?
@sanjoyforever . Please advise how much seconds time delay to be added if EQ data is fetched through the for loop to avoid IP block by NSEINDIA