softwarespartan / IB4m

Interactive Brokers API for Matlab
GNU General Public License v2.0
62 stars 21 forks source link

reqMktData - requires additional boolean in order to work under TWS 9.73 #36

Open Benvaulter opened 5 years ago

Benvaulter commented 5 years ago

Hi Abel,

finally managed to upgrade everything to version 9.73 and still trying to get used to the new ways to set fields etc. When testing the code I initially had issues running the reqMktData function so I checked the docs and it wouldn't work there for me neither so I checked the IB API docs - it seems they now require an additional boolean (one for snapshots, and one for regulatory snapshots). From your example in the docs:

% request market data subscription.  Note that arg4 is read as "snapshot=false"
session.eClientSocket.reqMktData(reqId,contract,genericTickList,false,[]); pause(1);

In order for it work, I had to insert an additional "false", like so:

% request market data subscription.  Note that arg4 is read as "snapshot=false"
session.eClientSocket.reqMktData(reqId,contract,genericTickList,false,false,[]); pause(1);

Just in case anyone else stumbles upon this.

Thanks so much for your effort and for sharing!