☰
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.2K
All Categories
0
Incidents
126
Node JS client
36
Go client
765
.Net API client
360
Kite Publisher
532
.Net / VBA / Excel (3rd party)
433
Algorithms and Strategies
964
Java client
1K
API clients
400
PHP client
3.8K
Python client
331
Mobile and Desktop apps
1.3K
Market data (WebSockets)
3.1K
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