-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added: feature to get historical option data #48
Conversation
Sample input: |
nsedt/derivatives/options.py
Outdated
""" | ||
cookies = utils.get_cookies() | ||
base_url = cns.BASE_URL | ||
event_api = cns.FUTURES_PRICE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall I rename this variable as it same for both futures and options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have migrated the url to FNO_HISTORY and its reference.
@@ -21,6 +21,7 @@ def price(result): | |||
"CH_TRADE_LOW_PRICE", | |||
"CH_CLOSING_PRICE", | |||
"CH_PREVIOUS_CLS_PRICE", | |||
"CH_LAST_TRADED_PRICE", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add support for last price as its a very an important price for analysis.
We have an requirment to seek historical option data for a given strike price, currently we are doing it by a custom script. So thought of extending the support to the library itself.
URL we are trying to mimic is : https://www.nseindia.com/report-detail/fo_eq_security
How is it tested?
On my local system for various strike price and option data
Let me know if this looks okay to you!