Reputation: 25
I am using the below code in pycharm:-
from nsepy import get_history
from datetime import date
import pandas
start_date=date(2021, 5,1)
end_date=date.today()
df = get_history(symbol='SBIN' ,start=start_date, end=end_date )
print(df)
However it does not display anything in pycharm.
Upvotes: 1
Views: 127
Reputation: 25
Yes the problem was the companies VPN connection blocking the NSEPY APi. Disabling the VPN and runing the code gave the output.
Upvotes: 0
Reputation: 65
Can confirm that copying and pasting your code returns data in the console as you can see below. I suspect you are running another script/tab when you click run in PyCharm.
Upvotes: 1