Connecting to Interactive Broker

>> ib=ibtws ('',7496) Error using actxserver (line 90) Server creation failed. Invalid ProgID 'TWS.TwsCtrl.1'.
Error in ibtws
>>

4 comentarios

Peter chan
Peter chan el 18 de Nov. de 2016
I dont know how to solve this problem. I have tried the solutions that people was posted on other mathwork but it doesnt work for me.
I am using Winodws 10 ,Matlab R2016, and API 9.7. I have tried different API version. However I doesnt work too. Thank you
Server Master
Server Master el 30 de Dic. de 2016
I have the same issue. R2016b 64bit. API_Version=9.71 and latest TWS 962, newly installed. Tried all suggestions I can found, it Won't work for me. Please help.
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

0 votos

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

0 votos

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

Preguntada:

el 18 de Nov. de 2016

Comentada:

el 1 de Dic. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by