In that case you call reqContractDetails() with the contract parameters provided. contractDetails() will respond and you need to store all returned contracts in a list.
Once you have that list you can loop over all stored contracts: call reqMktData(), collect the prices from tickPrice(), then cancelMktData(). Do this for every contract in the list.
Thanks I used a dataframe instead of a list and that worked. Only problem now is I'm getting errors "Error: 641 101 Max number of tickers has been reached"
Don't know if I can solve that by using a timer so there is more time in between each request. I also obviously don't need to request every single option so will have to figure out how to filter that before. Maybe by volume or distance from the underlying price.