Option Chain
-
In NIFTY there is around 200 of token for weekly expiry. Anyone have an idea that how to process of of token data simultaneously and take it as a padas data frame to excel. It may possible with threading, multiprocessing.pool..
Feel free to contact me 9737599545 -
@subh you can download instrument file and put a logic that nifty and latest/nearest expiry day i.e today or nearest and then pass it in instrument list. this will fetch data from instrument_file with nifty strike as filter and then get you data via websocket.
you can do manual work on updating intrument_key in websocket. -
@chetansuri I have done it all but when it come to update pandas data frame data not update on every second. There is delay and may missing data.
I want to know how to use threading and multiprocessing module for simultaneously process and update data. -
@subh
There would be delay and some data would obviously be missing because there are ingenuities in the API infrastructure. It's about data retrieval.
Regards,
Jaideep Siddula -
@jaideep-siddula how to use threading module
-
@subh
https://docs.python.org/3/library/threading.html#module-threading
Check this documentation to write the code yourself. Cheers! -
@subh what is your use case that you want every tick data at 1 sec. you can always workout without such high frequency data.
You can use few strike price as you will not need tick for complete option chain.
If your use case demands every tick and processing. use some db and then work around that. Pandas dataframe and then running will always take some processing time. save raw data somewhere if you wish to. Maybe use 1 task for saving and another for processing.