I am unable to download derivatives data using NSEpy…
Can anyone help me with that?
Hello Shubham,
What are the issues you are facing?
Here is a sample code for getting SBI futures data:
from datetime import date
from nsepy import get_history
Stock options (Similarly for index options, set index = True)
stock_fut = get_history(symbol="SBIN",
start=date(2015,1,1),
end=date(2015,1,10),
futures=True,
expiry_date=date(2015,1,29))
Do get back if you face problems.
Thank you for taking out time to answer my query.
I am really sorry as I did not mention as to what exactly I am looking for…
I am looking for the data that has the following information:-
1- Index value. (Nifty in my case)
2- No of advancing stocks price(Daily)
3- No of declining stocks (Daily)
4-Volume of each advancing and declining stock respectively
5- Open Interest in Index Futures.
Not necessary to download it in a single file.
I am okay with multiple downloads…
and I will also need some help in extracting information from multiple csv to a single csv…
I need this information to create a strategy using TRIN indicator.
Please help.
Hi Shubham,
For the 1st and 5th point, you can directly fetch data from nsepy package.
For the 2nd, 3rd and 5th point, you need to define a list of stocks (say stocks in Nifty50) then pull data for those stocks to determine advancing, declining and volumes.
Hope this helps.
Okay…
Thanks, I will try that…