Re: Connecting to IB

182 views
Skip to first unread message
Message has been deleted

Sfl

unread,
May 7, 2013, 4:41:17 AM5/7/13
to tbg-quant...@googlegroups.com
Hello Brian,

Yes, you are missing the api-examples.jar, you have to add it in your classpath library.
Seems that InteractiveBrokers moved to GitHub and they took away the api-examples.jar.
Unfortunately I cannot embed this api-examples.jar library in distribution files due to license restriction :-/
We are going to fix this issue immediately, we will post here within a day with detailed instructions on how to embed IB api and run the HelloIB example.

Thank you
Alberto

Sfl

unread,
May 7, 2013, 6:59:18 AM5/7/13
to tbg-quant...@googlegroups.com
The issue has been fixed in the MASTER repository of GitHub and it will be available since tbg-Quant-v1.1beta5
We are now supporting IB API version 9.68

You just have to add jtsclient.jar library to the /lib folder.

jtsclient.jar can be found inside the twsapi_unixmac_968.jar you can download from  http://interactivebrokers.github.io/#

thank you
Alberto

Brian Sherman

unread,
May 7, 2013, 8:58:40 AM5/7/13
to tbg-quant...@googlegroups.com
Thanks Alberto for the quick response.  I deleted my earlier post because it was displaying my IB Client ID and I didn't want that there.

I'll paste it below again for reference without that information.

Thanks for your help.

--------

Hi,

I'm trying to connect TBG to the IB API. I copied over the com.ib source folder and can get the IB java test client to run, but cannot get TBG-Quant to run successfully

When I try to run the HelloIB example I'm getting the exceptions below.  Am I missing a jar?  Thanks for your help.

../config/tbg-Quant.properties not found, checking ClassPath...
tbg-Quant.properties not found in ClassPath, loading default settings (inMemoryDB).
Cannot find config.proprieties file, proceeding without it.
Found 7 symbols!
Strategy ID : HelloIB
Strategy HelloIB started [Mon May 06 21:53:07 EDT 2013]
Strategy Description: InteractiveBrokers tick streaming
onStart(): 
Using default storeService...DEFAULT_STORESERVICE
RunID: [UserID:tbg][RunID:1][Description:InteractiveBrokers tick streaming][StrategyName:HelloIB][StrategyClass:HelloIB]
MarketDataEventType setted to TICK_EVENT
Pass-Through CEP Provider
Connecting to InteractiveBrokers
Server Version:67
TWS Time at connection:20130506 21:53:06 EST
Exception in thread "EReader" java.lang.NoClassDefFoundError: com/ib/client/examples/util/RequestIDManager
Active MarketDataFeed...
Starting up for symbol XOM
Starting up for symbol CVX
Starting up for symbol MS
Starting up for symbol IBM
Starting up for symbol BHP
Starting up for symbol LMT
Starting up for symbol GS
at com.tbg.adapter.interactivebrokers.broker.InteractiveBrokersAdapter.nextValidId(InteractiveBrokersAdapter.java:484)
at com.ib.client.EReader.processMsg(EReader.java:642)
at com.ib.client.EReader.run(EReader.java:70)
Caused by: java.lang.ClassNotFoundException: com.ib.client.examples.util.RequestIDManager
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 3 more
Exception in thread "Thread-5" java.lang.NoClassDefFoundError: com/ib/client/examples/util/RequestIDManager
at com.tbg.adapter.interactivebrokers.broker.InteractiveBrokersAdapter.fetchMarketData(InteractiveBrokersAdapter.java:106)
at com.tbg.adapter.interactivebrokers.broker.IBMarketDataFeed$1.run(IBMarketDataFeed.java:124)
Exception in thread "Thread-10" java.lang.NoClassDefFoundError: com/ib/client/examples/util/RequestIDManager
at com.tbg.adapter.interactivebrokers.broker.InteractiveBrokersAdapter.fetchMarketData(InteractiveBrokersAdapter.java:106)
at com.tbg.adapter.interactivebrokers.broker.IBMarketDataFeed$1.run(IBMarketDataFeed.java:124)
Exception in thread "Thread-6" java.lang.NoClassDefFoundError: com/ib/client/examples/util/RequestIDManager
at com.tbg.adapter.interactivebrokers.broker.InteractiveBrokersAdapter.fetchMarketData(InteractiveBrokersAdapter.java:106)
at com.tbg.adapter.interactivebrokers.broker.IBMarketDataFeed$1.run(IBMarketDataFeed.java:124)
Exception in thread "Thread-8" java.lang.NoClassDefFoundError: com/ib/client/examples/util/RequestIDManager
at com.tbg.adapter.interactivebrokers.broker.InteractiveBrokersAdapter.fetchMarketData(InteractiveBrokersAdapter.java:106)
at com.tbg.adapter.interactivebrokers.broker.IBMarketDataFeed$1.run(IBMarketDataFeed.java:124)
Exception in thread "Thread-11" java.lang.NoClassDefFoundError: com/ib/client/examples/util/RequestIDManager
at com.tbg.adapter.interactivebrokers.broker.InteractiveBrokersAdapter.fetchMarketData(InteractiveBrokersAdapter.java:106)
at com.tbg.adapter.interactivebrokers.broker.IBMarketDataFeed$1.run(IBMarketDataFeed.java:124)
Exception in thread "Thread-7" java.lang.NoClassDefFoundError: com/ib/client/examples/util/RequestIDManager
at com.tbg.adapter.interactivebrokers.broker.InteractiveBrokersAdapter.fetchMarketData(InteractiveBrokersAdapter.java:106)
at com.tbg.adapter.interactivebrokers.broker.IBMarketDataFeed$1.run(IBMarketDataFeed.java:124)
Exception in thread "Thread-9" java.lang.NoClassDefFoundError: com/ib/client/examples/util/RequestIDManager
at com.tbg.adapter.interactivebrokers.broker.InteractiveBrokersAdapter.fetchMarketData(InteractiveBrokersAdapter.java:106)
at com.tbg.adapter.interactivebrokers.broker.IBMarketDataFeed$1.run(IBMarketDataFeed.java:124)

Reply all
Reply to author
Forward
0 new messages