Connect Interactive Brokers Trader Workstation with Matlab

7 views (last 30 days)
I have the known problem when trying to connect to the IB TWS. The command
ib = ibtws('',7496)
returns
Error using actxserver (line 90)
Server creation failed. Invalid ProgID 'TWS.TwsCtrl.1'.
Error in ibtws
I am using
  • Mac OS 10.12.2
  • Matlab 2016b 64-bit
  • IB TWS for Mac OS X 64-bit Version 952.3b
  • IB Gateway for Mac OS X 64-bit Version 952.3b
I know that there is an existing thread ( https://de.mathworks.com/matlabcentral/answers/111625-trading-toolbox-connecting-to-interactive-broker ) describing the same problem for Windows. But maybe there is an alternative solution for Mac?
Also, do I need the Java files given in the mentioned thread ( http://interactivebrokers.github.io/# ) and if yes, how do I implement them? Thanks for your support, it would be nice to get IB running on my Matlab!

Accepted Answer

Steven Lord
Steven Lord on 1 Feb 2017
Take a look at this other Answers post.

More Answers (1)

Yair Altman
Yair Altman on 6 Dec 2017
Trading Toolbox support for Interactive Brokers is limited to Windows only. This is clearly mentioned in the documented system requirements. On Mac & Linux you will see the error that you mentioned because these OSes don't support COM, on which the Trading Toolbox connector to IB is based.
If you need a Matlab-IB connector on Mac or Linux, then try using my IB-Matlab toolbox instead: http://undocumentedmatlab.com/ib-matlab. IB-Matlab is based on IB's Java (not COM) API, so it runs well on all platforms that support Matlab: Windows, Mac and Linux.
Yair Altman

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!