Hi Jurgen,
?
Your advice. I instantiated only one TestApp() and set up a loop to pass multiple contracts.
?
I have a couple more questions for now:
?
1. I got all expirations and strikes with reqSecDefOptParams() and set up a nested loop to go through every combination. I was trying to pull historical data since I was coding after market hours.
Some combinations worked, some did not, because they simply did not exist. Anyway, I noticed that the terminal stopped dumping data at around reqId 72.
When I try to retrieve so much data, do I need to set up a pause after certain amount of iterations? Is there a limit to how many contracts per second I can request?
?
2. After realizing that I am iterating over contracts that may not exist, I tried retrieving them with reqContractDetails() method. I only specified contract.symbol, contract.secType, contract.exhcnage, and contract.currency. When I ran the code, the terminal gave me all contracts on the chain. Sometimes it took as little
as few seconds, sometimes it would take a minute or more before I saw anything appear in the terminal. When I tried saving conIDs to a list, I was only able to save the very last one. When I compared the code between reqContractDetails() and reqSecDefOptParams() in decoder.py, I realized that the former returns only one value, and the latter returns a set. I guess this is more of a coding question than how the API functions, but is there a way to save all the conIDs returned by reqContractDetails() to a list?
?
3. I will have another question regarding greeks, but I still have a couple methods to explore, so I'll check back in later with that.
?
Thank you!