API Support » Blocking call to get Contract? Nov 15, 2011 @ 09:08 AM (Total replies: 3) | |||||
By prepopulate, you mean make a bunch of SymbolLookup queries when the application opens? If so, this doesn't really solve my problem, but I guess I can do something ugly like make all the requests on one thread and block until I've gotten back the results via another thread. I've never seen another data API that required you to make a separate asynchronous call to get a reference to an object that then allows you to subscribe to data. Why not allow a developer to create a new Contract object by calling new with a symbol, if it exists in the ContractList you're good to go otherwise mark it as unverified until the API has time to look it up in the background? Anthony Baraff |
|||||
API Support » Blocking call to get Contract? Nov 15, 2011 @ 08:04 AM (Total replies: 3) | |||||
Is it possible to make a blocking call to get an instance of a Contract? If I know the symbols I want and just want to sequentially subscribe to them is there a simple method for doing this? Based on looking at the Advanced API Example combobox code, it seems as though I need to make a bunch of symbol lookup calls, then wait for call backs, then finally subscribe to each contract. This seems like a pretty obnoxiously roundabout way of doing what should be very simple. Please tell me that I am wrong. Thanks, Anthony Anthony Baraff |