Error while trying to get connected to a server

Hi,
While using the matlab command ib = ibtws('',7496); to try to get connected to the software Interactive Brokers, I got this answer from matlab:
Error using actxserver (line 93)
Server creation failed. Invalid ProgID 'TWS.TwsCtrl.1'.
Error in ibtws (line 37)
x.Handle = actxserver('TWS.TwsCtrl.1');
Could you give me an answer of how to cope with this issue ?

1 件のコメント

philip curran
philip curran 2022 年 6 月 29 日
have you enabled activeX and socket clients in the IB TWS settings?

サインインしてコメントする。

回答 (1 件)

Meet
Meet 2025 年 1 月 16 日

0 投票

Hi Roux,
This error indicates that the Trading Toolbox in MATLAB cannot establish a connection to the IB Trader Workstation ActiveX-based API. To resolve this error, first follow the troubleshooting steps mentioned in following MathWorks post: 
If after following the above post, you are able to get "success" message from Excel VBA and still getting connection error in MATLAB, then try following troubleshooting steps as a possible workaround.
  1. Check if the anti-virus is blocking the application.
  2. Uninstall IB TWS and API.
  3. Delete all previous installation files and particularly delete following file (if it exists): "C:\Windows\SysWOW64\TwsSocketClient.dll"
  4. Re-install stable version of IB TWS, and API from following link: http://interactivebrokers.github.io/downloads/TWS%20API%20Install%20971.06.msi
Hope this resolve the error!!

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

製品

質問済み:

2022 年 2 月 18 日

回答済み:

2025 年 1 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by