Connecting to Interactive Broker

15 visualizaciones (últimos 30 días)
Peter chan
Peter chan el 18 de Nov. de 2016
Comentada: Annie Leonhart el 1 de Dic. de 2019
>> ib=ibtws ('',7496) Error using actxserver (line 90) Server creation failed. Invalid ProgID 'TWS.TwsCtrl.1'.
Error in ibtws
>>
  4 comentarios
christian barbotin
christian barbotin el 16 de Oct. de 2019
Hi
Same for me, do you fing the solution ?
Thanks
Regards
Annie Leonhart
Annie Leonhart el 1 de Dic. de 2019
Items needed to have the toolbox work properly are:
  1. Trading Toolbox 3.5.1+ you can validate by running ver('trading') on Matlab.
  2. IB Gateway or TWS
  3. TWS API 9.76 (latest api)
Please validate you have all those items on the correct version.
If you have Trading toolbox 3.5.1 and Api 9.72, it won't work.
if you have Api 9.76 and trading toolbox 3.4.x it won't work (to my knowledge).
Let me know.

Iniciar sesión para comentar.

Respuestas (2)

A.P.
A.P. el 7 de En. de 2017
Provided you have the Trading Toolbox, Download and Install IB Gateway, by default the port is 4001, you either use this port in your code:
ib = ibtws ('',4001)
or change the port number in IB Gateway Configuration/Settings/API/Settings/Socket port

Yair Altman
Yair Altman el 12 de En. de 2018
Sometime in recent years, presumably around TWS API 9.70, IB changed their COM server's ProgID from 'TWS.TwsCtrl.1' to 'TWS.TwsCtrl'. This breaks the Trading Toolbox code, which assumes a ProgId of 'TWS.TwsCtrl.1'. Since the Trading Toolbox's code is encrypted, you cannot modify its expected ProgId. The best you could do is to try to uninstall your API and install an old version (possibly with the assistance of IB). Note that this might break other things for you - the old API version might not be fully supported by IB today, but it's worth trying.
Or you can try my Java-API-based IB-Matlab connector which does not rely on COM and does not exhibit any of the problems that are common with the ActiveX/COM-based interface.
Yair Altman

Categorías

Más información sobre Trading Technologies en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by