☰
Login
Signup
Home
›
Algorithms and Strategies
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.8K
All Categories
0
Incidents
154
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
993
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
July 2022
Imran
July 2022
satheesh7134
July 2022
SRIJAN
Getting NFO dump for a particular expiry date
satheesh7134
July 2022
in
Algorithms and Strategies
Hi Everyone
The below line of code gives me the complete dump of all instruments traded under NFO
self.instrument_dump = self.kite.instruments("NFO")
But I don't want the entire dump, I just need the dump corresponding to particular expiry [for eg, 28.07.2022]
Please let me know how to achieve this
Thanks
Satheesh
SRIJAN
July 2022
There is a expiry column in the instruments dump.
You can use that to filter instruments for any expiry.
satheesh7134
July 2022
Hi Srijan
I tried this code,but its giving error
self.instrument_dump = self.kite.instruments("NFO")['expiry'] = "28-07-2022"
Please advise the correct way to do this
SRIJAN
July 2022
edited July 2022
Convert the instruments dump into a pandas dataframe and then you can sort easily.
Imran
July 2022
@satheesh7134
instrument = kite.instruments()
instrument = pd.DataFrame(instrument)
instrument['expiry'] = instrument['expiry'].astype(str)
expiry_df = instrument[instrument['expiry'] == '2022-07-28']
satheesh7134
July 2022
@Imran
Thanks. If I try to do this on the main code, it's taking lot of load, the execution is getting slowed
So took all the dump into CSV file and retrieving from there
Sign In
or
Register
to comment.
You can use that to filter instruments for any expiry.
I tried this code,but its giving error
self.instrument_dump = self.kite.instruments("NFO")['expiry'] = "28-07-2022"
Please advise the correct way to do this
instrument = kite.instruments()
instrument = pd.DataFrame(instrument)
instrument['expiry'] = instrument['expiry'].astype(str)
expiry_df = instrument[instrument['expiry'] == '2022-07-28']
Thanks. If I try to do this on the main code, it's taking lot of load, the execution is getting slowed
So took all the dump into CSV file and retrieving from there