Hello!
?
I am not a programmer by trade. I started messing around with the TWS API as a side project to learn a little bit of coding.
?
I have figured out how to get historical data, get a full option chain etc. A friend of mine helped me figure out how to dump all the data I want into a CSV file.
?
I recently also took a day off of work to play with the code during market hours to see how live data works and because there is no greeks and no volume for options available in historical data.
?
Now, the line of code that requests live data is:
app_underlying.reqMktData(app_underlying.nextId(), option_contract, "", False, False, [])
?
where app_underlying is the instance of TestApp (I kept the name the same as in the IBKR documentation and basic tutorials on IBKR campus) and option_contract is an instance of Contract().
?
Now, suppose there is 50 contracts between all calls, puts, strikes, and expirations. I was thinking of instantiating Contract() class for every single one of those options.
?
But, how do I live stream all of them? Do I also have instantiate 50 TestApp() classes:
app_underlying = TestApp()
app_underlying.connect("127.0.0.1", port, 0)
threading.Thread(target=app_underlying.run).start()
and give each one a unique clientid and run threading on every one of them?
?
Thanks in advance!
?