Interactive Brokers API Connection Error

4 Ansichten (letzte 30 Tage)
Troy Langley
Troy Langley am 29 Jan. 2018
Kommentiert: Troy Langley am 6 Dez. 2018
I just installed the Trading Toolbox 2017b and the IB API 9.73 Windows 10. I keep getting this error:
ib = ibtws('',7496);
Error using actxserver (line 90) Server creation failed. Invalid ProgID 'TWS.TwsCtrl.1'.

Akzeptierte Antwort

Troy Langley
Troy Langley am 30 Jan. 2018
I received a very rapid and accurate answer from Amy at Mathworks after reporting this issue.
Version 9.72 of the API does not support 64 bit and downloading to an earlier version fixed the issue. It did not however work for me on Windows 10 though others may have gotten it to work.
The immediate fix is to use the beta version of IB API 9.73 which is supported by Matlab 2018a per-release. I uninstalled my previous API and then 9.73, then Matlab 2018a per-release and it does work now. This is a quick and easy fix and I would like to commend the Mathworks team and Amy on a great product and rapid support.
  4 Kommentare
Diego Ochoa
Diego Ochoa am 6 Dez. 2018
Bearbeitet: Diego Ochoa am 6 Dez. 2018
Hey Troy ,
Thanks for the tip. nevertheless, I'm still in the woods here. I used the command you pointed out but it looks like there's no ActiveX controller for TWS. I'm not much of a file reader but I suppose it should Display TWS somewhere...and also, I've been told by Technical support at IB that 9.74 enhances 9.73, so If the fix works on 9.73, it should work on 9.74. Anyway, this is the nth time I have to struggle with this issue in the last 3 years. I'dlike to talk with Amy but there's no way of contacting matlab support about any of this issues.
{
'Adobe PDF Reader' } {'AcroPDF.PDF.1' } {'C:\Program Files (x86)\C…'}
{'CTreeView Control' } {'CTREEVIEW.CTreeViewCtrl.1' } {'C:\WINDOWS\system32\dmoc…'}
{'CommonDialog Class' } {'WIA.CommonDialog.1' } {'C:\WINDOWS\System32\wiaa…'}
{'DeviceManager Class' } {'WIA.DeviceManager.1' } {'C:\WINDOWS\System32\wiaa…'}
{'HHCtrl Object' } {'Internet.HHCtrl.1' } {'C:\Windows\System32\hhct…'}
{'HHCtrl Object' } {'Internet.HHCtrl.1' } {'C:\Windows\System32\hhct…'}
{'HHCtrl Object' } {'Internet.HHCtrl.1' } {'C:\Windows\System32\hhct…'}
{'HtmlDlgHelper Class' } {'HtmlDlgHelper.HtmlDlgHel…'} {'C:\Windows\System32\msht…'}
{'ListPad class' } {'ListPad.ListPad.1' } {'C:\WINDOWS\system32\cic.…'}
{'MMC IconControl class' } {'MMC.IconControl.1' } {'C:\WINDOWS\system32\mmcn…'}
{'MMCCtrl class' } {'MMCCtrl.MMCCtrl.1' } {'C:\WINDOWS\system32\cic.…'}
{'MS TV Video Control' } {'MSVidCtl.MSVidCtl.1' } {'C:\Windows\System32\msvi…'}
{'Macromedia Flash Factory…'} {'FlashFactory.FlashFactor…'} {'C:\Windows\System32\Macr…'}
{'MeetingJoinHelper Class' } {'CommunicatorMeetingJoinA…'} {'C:\Program Files (x86)\M…'}
{'Microsoft InkEdit Control' } {'InkEd.InkEdit.1' } {'C:\WINDOWS\System32\Inke…'}
{'Microsoft InkPicture Con…'} {'msinkaut.InkPicture.1' } {'C:\Program Files\Common …'}
{'Microsoft RDP Client Con…'} {'MsRDP.MsRDP.9' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsRDP.MsRDP.10' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsRDP.MsRDP.2' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsRDP.MsRDP.2.a' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsRDP.MsRDP.3' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsRDP.MsRDP.3.a' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsRDP.MsRDP.4' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsRDP.MsRDP.4.a' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsRDP.MsRDP.5' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsRDP.MsRDP.6' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsRDP.MsRDP.7' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsRDP.MsRDP.8' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsTscAx.MsTscAx.10' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsTscAx.MsTscAx.11' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsTscAx.MsTscAx.2' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsTscAx.MsTscAx.3' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsTscAx.MsTscAx.4' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsTscAx.MsTscAx.5' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsTscAx.MsTscAx.6' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsTscAx.MsTscAx.7' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsTscAx.MsTscAx.8' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft RDP Client Con…'} {'MsTscAx.MsTscAx.9' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft Scriptlet Comp…'} {'ScriptBridge.ScriptBridg…'} {'C:\Windows\System32\msht…'}
{'Microsoft Shell Folder V…'} {'Shell.FolderView.1' } {'C:\WINDOWS\system32\shel…'}
{'Microsoft Terminal Servi…'} {'MsTscAx.MsTscAx.1' } {'C:\WINDOWS\system32\msts…'}
{'Microsoft Web Browser' } {'Shell.Explorer.2' } {'C:\Windows\System32\iefr…'}
{'Mwsamp Control' } {'MWSAMP.MwsampCtrl.1' } {'C:\Program Files\MATLAB\…'}
{'Mwsamp2 Control' } {'MWSAMP.MwsampCtrl.2' } {'C:\Program Files\MATLAB\…'}
{'OleInstall Class' } {'OlePrn.OleInstall.1' } {'C:\WINDOWS\system32\olep…'}
{'RDPViewer Class' } {'Rdpvcomapi.RDPViewer.1' } {'C:\WINDOWS\system32\rdpe…'}
{'Shockwave Flash Object' } {'ShockwaveFlash.Shockwave…'} {'C:\Windows\System32\Macr…'}
{'Skype for Business Web A…'} {'Microsoft.LWA64Plugin15.…'} {'C:\Users\Diego Ochoa\App…'}
{'Synaptics Device Control' } {'SynCtrl.SynDeviceCtrl.3' } {'C:\WINDOWS\system32\SynC…'}
{'Synaptics Display Control' } {'SynCtrl.SynDisplayCtrl.1' } {'C:\WINDOWS\system32\SynC…'}
{'Synaptics Group Control' } {'SynCtrl.SynGroupCtrl.3' } {'C:\WINDOWS\system32\SynC…'}
{'Synaptics Packet Control' } {'SynCtrl.SynPacketCtrl.3' } {'C:\WINDOWS\system32\SynC…'}
{'SysColorCtrl class' } {'SysColorCtrl.SysColorCtr…'} {'C:\WINDOWS\system32\cic.…'}
{'System Monitor Control' } {'Sysmon.3' } {'C:\WINDOWS\System32\sysm…'}
{'Tabular Data Control' } {'TDCCtl.TDCCtl.1' } {'C:\Windows\System32\tdc.…'}
{'TaskSymbol Class' } {'Control.TaskSymbol.1' } {'C:\WINDOWS\system32\mmcn…'}
{'UMRDPProtocolManager Cl…'} {'RdpCoreTS.WRdsProtocolMa…'} {'C:\WINDOWS\system32\rdpc…'}
{'Windows Media Player' } {'WMPlayer.OCX.7' } {'C:\WINDOWS\system32\wmp.…'}
{'Windows Store Remote Des…'} {'RemoteDesktopClient.Remo…'} {'C:\WINDOWS\system32\msts…'}
{'WorkspaceBrokerAx Class' } {'WorkspaceBrokerAx.Worksp…'} {'C:\WINDOWS\system32\wksp…'}
>>
Troy Langley
Troy Langley am 6 Dez. 2018
Diego,
The next step I would reccommend is to uninstall and then reinstall the latest version of Trader Work Station. Make sure you are logged into the account you intend to use before you try to connect. Also check your settings in TWS under Global configuration to make sure API access is enabled.
Troy

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (2)

Walter Roberson
Walter Roberson am 29 Jan. 2018
  1 Kommentar
Troy Langley
Troy Langley am 29 Jan. 2018
Those solutions did not work. I installed the C++ Redistrib 2005. Uninstalled the V9.73 of the API and installed V9.71, installed 32 bit Matlab 2015b, etc.

Melden Sie sich an, um zu kommentieren.


Yair Altman
Yair Altman am 29 Jan. 2018
Bearbeitet: Yair Altman am 29 Jan. 2018
Sometime in recent years, presumably around API version 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 that you can do is to try to uninstall your API and install an old version (possibly with IB's assistance). 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. See also this answer about the exact same problem.
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
  1 Kommentar
Troy Langley
Troy Langley am 29 Jan. 2018
Yair, Thank you for the explanation. This seems like a bug that should be on the Matlab side since the Trading Toolbox is out of date and this would seem to be a simple fix. In this case it seems that my solution is to request a refund for the Trading Toolbox from Mathworks and to instead use your connector which I have tried and it works. Thank you again.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by