필터 지우기
필터 지우기

Error Connecting to IB using ibtws

조회 수: 1 (최근 30일)
jup
jup 2015년 3월 21일
댓글: philip curran 2021년 11월 17일
Hi guys,
I'm having a bit of trouble connecting to the IB Trader Workstation using the Trading Toolbox command ibwts. I've found a few other questions that were left unanswered but if anyone can help out it would be much appreciated. A bit of information:
TWS Build: 949.3a -- Enabled ActiveX & Socket Clients
API Version: 9.71
Matlab R2014b
Windows 8.1, 64 bit
Below is the code and error I receive. Thanks for any help.
ib = ibtws('',7496)
---------
Error using feval
Server Creation Failed: The application has failed to start because its
side-by-side configuration is incorrect. Please see the application event log or
use the command-line sxstrace.exe tool for more detail.
Error in actxserver (line 86)
h=feval(['COM.' convertedProgID], 'server', machinename, interface);
Error in ibtws (line 38)

답변 (6개)

Yair Altman
Yair Altman 2015년 3월 22일
This problem is due to using the ActiveX connector to IB.
You might wish to try the cross-platform Java-based approach (not ActiveX) of the IB-Matlab product: http://undocumentedmatlab.com/ib-matlab

Al Samuex
Al Samuex 2015년 3월 31일
Seriously? Isn't there a solution that doesn't cost 400 dollars? This is ridiculous.

Karim
Karim 2015년 5월 2일
I have exactly the same issue,...

Walter Roberson
Walter Roberson 2015년 5월 4일
You have incompatible library files installed.
https://support.microsoft.com/en-us/kb/2525435
https://www.youtube.com/watch?v=uRLznz_wI-k

Sergiu TICU
Sergiu TICU 2016년 2월 9일
I have managed to solved this by installing the 32 bit Version of “ Microsoft Visual C++ 2005 Redistributable ”. Here more information on how to link Matlab to IB TWS.

SBC
SBC 2019년 11월 15일
편집: SBC 2019년 11월 15일
I have found the solution. I am using R2019a x64 on Windows 10. It may work for previous versions.
  1. Install latest "stable" API from Interactive Brokers. Link Here
  2. Install IB Gateway. Link Here
  3. Install both x86 and x64 Visual C++ from Microsoft. Link Here
  4. It'll make you reboot your PC.
Run IB Gateway and connect. Note the "Socket port" of the gateway through Configure > Settings > API > Settings
Run the following code and you should be connected.
ib = ibtws('127.0.0.1', 4001,1) % Change the port to your IB Gateway or Workstation port
% Create IB contract
ibContract = ib.Handle.createContract;
ibContract.symbol = 'IBM';
ibContract.secType = 'STK';
ibContract.exchange = 'SMART';
ibContract.primaryExchange = 'IEX';
ibContract.currency = 'USD';
format bank
d = getdata(ib,ibContract) % Return market data
  댓글 수: 1
philip curran
philip curran 2021년 11월 17일
I am using 2020b version of matlab, using:
ib = ibtws('127.0.0.1', 4001,1)
gives an error saying you need the trading toolbox, however matlab have changed the trading toolbox to the datafeed toolbox and financial toolbox which don't have any features to send requests to interactive brokers.
Any solutions??

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Trading Technologies에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by