Interactive Brokers Java API Example

Referring to following coding, I would like to know on how to retrieve the ConID from contractdetials.

Does anyone have any suggestions?
Thanks in advance for any suggestions

private static void contractOperations(EClientSocket client) {

//! [reqcontractdetails]
client.reqContractDetails(214, ContractSamples.SimpleFuture());
//! [reqcontractdetails]

//! [reqmatchingsymbols]
client.reqMatchingSymbols(214, "IB");
//! [reqmatchingsymbols]
 
Referring to following coding, I would like to know on how to retrieve the ConID from contractdetials.

Does anyone have any suggestions?
Thanks in advance for any suggestions

private static void contractOperations(EClientSocket client) {

//! [reqcontractdetails]
client.reqContractDetails(214, ContractSamples.SimpleFuture());
//! [reqcontractdetails]

//! [reqmatchingsymbols]
client.reqMatchingSymbols(214, "IB");
//! [reqmatchingsymbols]

When your client application calls method "reqContractDetails" through the EClientSocket connection, Interactive Brokers will reply to your client by calling method "contractDetails()" in your client's implementation of the EWrapper connection.
In the first instance I would code your application to simply print to console all of the data received as parameters to this method - and look for ConID in that.
 
Hi All,

Wanted to share the Interactive Brokers Java API I've been using for my algo trading:
https://github.com/rediar/InteractiveBrokers-Algo-System

This works for all asset classes IB offers. There seems to be a lack of fully functional examples online.

Hi!, Thank you very much for share this with us. So, I would like to know if you have made this in NetBeans, Eclipse or what developer software... I am very interesting to lear about the IB api to create my own trading app. Can you help me with that ? in the other hand, if you have another project or something that can help me, please let me know I really appreciate it.

Thanks in advance.
 
Top