-
When I try to create a standalone application to start building some strategies for IBKR, I run into NoClassDefFoundError with the following code inside my main method:
I am not very comfortable with Kotlin and am going to have to learn to make progress, but I was hoping that someone could point me to an obvious misuse or the recommended way to work with IBKR in a standalone roboquant application. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Unfortunately, it is not allowed to redistribute the Interactive Brokers Java client. So you’ll have to download the TwsApi.jar file yourself. You can download the stable version 10.19 from here: https://interactivebrokers.github.io/ and within the downloaded archive file you’ll find the required TwsApi.jar. Then install the jar file in the local Maven repository on your machine using the following command: mvn install:install-file -Dfile=TwsApi.jar -DgroupId=com.interactivebrokers -DartifactId=tws-api -Dversion=10.19 -Dpackaging=jar |
Beta Was this translation helpful? Give feedback.
-
I have the suggested version of TwsApi.jar installed in my local m2 repo. 'mvn install' succeeds for me, but when i try to run it ('mvn exec:java') fails with the error I listed earlier - java.lang.NoClassDefFoundError: org/roboquant/ibkr/IBKRHistoricFeed$Wrapper. Do I need to do anything differently?
|
Beta Was this translation helpful? Give feedback.
-
I ran the maven archetype as suggested here and added the roboquant-ibkr to the generated pom.xml. Here is the relevant part of the pom.xml:
|
Beta Was this translation helpful? Give feedback.
-
That was it, thank you! |
Beta Was this translation helpful? Give feedback.
Try adding the client lib dependency also to the pom file: