Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 544
Andreas K. Avatar asked Feb 28 '12 12:02

Andreas K.


People also ask

What is Interactive Brokers API?

The TWS API is a simple yet powerful interface to automate your trading strategies, request market data and monitor your account balance and portfolio in real time. Build your own trading application or connect your custom application to TWS so that you can take advantage of our advanced trading tools.

What is IBPy?

IBPy is a third-party implementation of the API used for accessing the Interactive Brokers on-line trading system. IBPy implements functionality that the Python programmer can use to connect to IB, request stock ticker data, submit orders for stocks and futures, and more.

Does Interactive Brokers allow automated trading?

For the first time, traders of all levels can automate their own unique trading strategies, using everyday English. From managing your daily trades to building complex automated systems - with Capitalise.ai you can automate your trading, zero coding needed.


1 Answers

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

like image 51
rudimeier Avatar answered Sep 25 '22 00:09

rudimeier