CPP Interactive Brokers TWS Linux demo works
You Google ‘pytws tutorial’ and this came up! WHOOOOOOOOOOOOOOOO!
From http://mandke.com/blog/getting-started-with-interactive-brokers, I found the following GIT HUB project
BREAKING NEWS! I got a successful demo working with C++ using Interactive Brokers TWS in Ubuntu Linux
This is with the following build instructions from:
THIS CODE WORKS!!
For TWSAPI build process:
Note When building from git checkout you need both autotools and libtool. Also, don’t forget to type autoreconf -vfi first.
git clone https://github.com/rudimeier/twsapi
To install autotools:
sudo apt-get install autotools-dev
To install autoconf
sudo apt-get install autoconf
autoreconf -v -f -i
make install <– run as root
Also under TestPosixSocketClient directory, I changed PostixTestClient.cpp with Interactive Brokers data info of:
//contract.symbol = “MSFT”;
contract.symbol = “AAPL”;
contract.secType = “STK”;
contract.exchange = “SMART”;
contract.currency = “USD”;
order.action = “BUY”;
order.totalQuantity = 1000;
//order.orderType = “LMT”;
//order.lmtPrice = 0.01;
order.orderType = “MKT”;
order.lmtPrice = 115.01;
order.auxPrice = 115.01;
Voila! It works
Join my FREE newsletter to learn more about algo trading with potential HFT with C++ in Linux!
I now post my TRADING ALERTS
into my personal FACEBOOK ACCOUNT
. Don't worry as I don't post stupid cat videos or what I eat!