☰
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
11.2K
All Categories
73
Node JS client
22
Go client
650
.Net API client
313
Kite Publisher
516
.Net / VBA / Excel (3rd party)
367
Algorithms and Strategies
845
Java client
854
API clients
368
PHP client
3K
Python client
300
Mobile and Desktop apps
1.1K
Market data (WebSockets)
2.7K
General
In this Discussion
July 20
Imran
July 20
satheesh7134
July 20
SRIJAN
Getting NFO dump for a particular expiry date
satheesh7134
July 20
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 20
There is a expiry column in the instruments dump.
You can use that to filter instruments for any expiry.
satheesh7134
July 20
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 20
edited July 20
Convert the instruments dump into a pandas dataframe and then you can sort easily.
Imran
July 20
@satheesh7134
instrument = kite.instruments()
instrument = pd.DataFrame(instrument)
instrument['expiry'] = instrument['expiry'].astype(str)
expiry_df = instrument[instrument['expiry'] == '2022-07-28']
satheesh7134
July 20
@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