uniVocity / univocity-trader

open-source trading framework for java, supports backtesting and live trading with exchanges
577 stars 140 forks source link

Interactive Brokers resolution error in maven #48

Closed kausality closed 4 years ago

kausality commented 4 years ago

I have cloned this repo and trying to get it working but I keep getting this error in my IDE:

Cannot resolve com.interactivebrokers:twsapi:9.76

It's related to how IB api is imported in maven in the ib module:

                <dependency>
            <groupId>com.interactivebrokers</groupId>
            <artifactId>twsapi</artifactId>
            <version>9.76</version>
            <scope>system</scope>
            <systemPath>${user.home}/dev/IBJts/source/JavaClient/TwsApi_debug.jar</systemPath>
        </dependency>

Where can we get this jar? I am unable to find the jars for TWS 9.76 online.

kausality commented 4 years ago

I ventually figured it out. We have to download it from: http://interactivebrokers.github.io/# And then change the systemPath to reflect the same in local environment.

Would humbly recommed that it is bundled with the repo itself. IB is just an extension and not the core product.

jbax commented 4 years ago

They don't allow bundling their jar. You have to agree to their terms and conditions then download it yourself.

On Sat, Jun 6, 2020, 8:24 AM Kaustubh Pratap Chand notifications@github.com wrote:

Would humbly recommed that it is bundled with the repo itself.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/uniVocity/univocity-trader/issues/48#issuecomment-639879290, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWFQPVAZUCAKIJYNJBQKFLRVFZTDANCNFSM4NVIXRZA .

kausality commented 4 years ago

They don't allow bundling their jar. You have to agree to their terms and conditions then download it yourself. On Sat, Jun 6, 2020, 8:24 AM Kaustubh Pratap Chand @.***> wrote: Would humbly recommed that it is bundled with the repo itself. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#48 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWFQPVAZUCAKIJYNJBQKFLRVFZTDANCNFSM4NVIXRZA .

I think this would be solved when UT is released as a maven package with various subproject mavens. To use IB we would have to manually add the dependency in our pom's.

Thanks.

maxsumrall commented 3 years ago

That you can't build the project unless you do these steps seems like a huge gotcha that should be addressed or at least added to the README (although the former is much more preferable).

jbax commented 3 years ago

@maxsumrall feel free to submit a PR

jbax commented 3 years ago

Also refer to this if you want to build the interactive brokers bit:

https://github.com/uniVocity/univocity-trader/blob/master/univocity-trader-interactivebrokers/README.md

Lastly, you can build the rest of the project without that jar.