Usage of C++ on Mac for Interactive Broker API? - Example?
Asked Answered
W

2

9

After years of no programming I am on my way to learn C++ on my Mac OSX. My eager goal is the creation of an algorithmic/automatic trading software for use with Interactive Brokers.

Now, I downloaded their API for Mac OSX and the docs. But I get the notion that the API for MacOSX is only for usage with Java?

I case I am wrong: I would be very happy if someone could help me with a few lines of C++ for usage on the IB-API, e. g. opening a session or loading marketdata for a security?

Btw, I did that with R and after having found some examples it was quite easy to use.

Thanks.

Waterspout answered 28/2, 2012 at 12:56 Comment(1)
Looking at the download instructions at interactivebrokers.com/en/control/… it sure does seem like it's only meant for Java. Yucko! If nobody responds here, you might get some decent feedback on Interactive Broker's discussion forums listed at the bottom of the API web pageLactiferous
S
13

IB also provides the so called "Posix C++ API" which should work on MacOSX (It's stupidly included within the twsapi_unixmac_*.jar archive).

There is an autotools based project (twsapi) from this original IB code which builds fine on MacOSX, see https://github.com/rudimeier/twsapi

A more exciting example of how to use twsapi in practice you may find in the twstools project there: https://github.com/rudimeier/twstools

Spinelli answered 28/2, 2012 at 15:3 Comment(0)
F
1

Another wrapper directly around the C++ Posix version that compiles and runs on many platforms is TwsApiC++.

You can find it at https://github.com/JanBoonen/TwsApiCpp

It also includes some examples.

Fulguration answered 25/8, 2016 at 14:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.