softwarespartan / IB4m

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

which api am i running #86

Closed ciaoitaly closed 4 years ago

ciaoitaly commented 4 years ago

Hi is there an easy way to know if my ib4m uses 9.72 or 9.73 api? I see in Jar folder that file is TWS.jar but it was changed 4 months ago so im confused. my goal is to create conditions order so i need 9.73 i assume?

softwarespartan commented 4 years ago

You should see TWS973.jar on the git master branch. Can you confirm you're on master?

ciaoitaly commented 4 years ago

In Jar folder, I see TWS.jar

ciaoitaly commented 4 years ago

What do you mean by "Can you confirm you're on master?"? I dont understand

ciaoitaly commented 4 years ago

Ok I think I was running old IB4m. I just updated to new one but it gets me an error when I run same code. When I create contract using contract = com.ib.client.Contract(); contract.m_secType = 'FUT';

No public field m_secType exists for class com.ib.client.Contract.

Do you know why I am getting this error with new IB4m?

THanks so much !!!

softwarespartan commented 4 years ago

There were some IB updates in the API in +973.

Checkout the IB API docs for defining contracts etc and I’ve also included some updated examples in the IB4m/docs folder

On Feb 18, 2020, at 4:24 PM, ciaoitaly notifications@github.com wrote:

 Ok I think I was running old IB4m. I just updated to new one but it gets me an error when I run same code. When I create contract using contract = com.ib.client.Contract(); contract.m_secType = 'FUT';

No public field m_secType exists for class com.ib.client.Contract.

Do you know why I am getting this error with new IB4m?

THanks so much !!!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

softwarespartan commented 4 years ago

For example, updated (+9.73) contract definition below

contract = com.ib.client.Contract();
contract.symbol('SPY')
contract.exchange('SMART');
contract.primaryExch('ISLAND');
contract.currency('USD');
contract.secType('STK');

See IB API docs here: http://interactivebrokers.github.io/tws-api/basic_contracts.html

ciaoitaly commented 4 years ago

Thanks much Abel !