softwarespartan / IB4m

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

using reqMatchingSymbols #73

Open dakr001 opened 5 years ago

dakr001 commented 5 years ago

Hi,

Another query from me please. I'm experimenting with using the reqMatchingSymbols function see below.

[symbolBuf,symbolllh] = TWS.initBufferForEvent(TWS.Events.SYMBOLSAMPLES); session.eClientSocket.reqMatchingSymbols(100,'USD-T'); pause(2) x = collection2cell(symbolBuf.get().data);

Got the error below: The class TWS.Events has no Constant property or Static method named 'SYMBOLSAMPLES'.

Where can I find the correct property/method for this call?

Thanks.

Despair2000 commented 5 years ago

The SYMBOLSAMPLES event is ot exposed so it won't work with IB4m. If you need it you will have to ask Abel to change that. I never needed it... Here is a list of all the events that shall work with IB4m:

NOTIFICATION = 'TWS_NOTIFICATION' ; REALTIMEBAR = 'TWS_REALTIMEBAR' ; HISTORICALDATA = 'TWS_HISTORICALDATA' ; ACCOUNTSUMMARY = 'TWS_ACCOUNTSUMMARY' ; ACCOUNTUPDATE = 'TWS_ACCOUNTUPDATE' ; POSITIONS = 'TWS_POSITIONS' ; MARKETDATA = 'TWS_MARKETDATA' ; MARKETMETADATA = 'TWS_MARKETMETADATA' ; MARKETDEPTH = 'TWS_MARKETDEPTH' ; CONTRACTDETAILS = 'TWS_CONTRACTDETAILS' ; OPENORDER = 'TWS_OPENORDER' ; ORDERSTATUS = 'TWS_ORDERSTATUS' ; PORTFOLIOUPDATE = 'TWS_PORTFOLIOUPDATE' ; EXECUTIONDETAILS = 'TWS_EXECUTIONDETAILS' ; NEXTORDERID = 'TWS_NEXTORDERID' ; SCANNERDATA = 'TWS_SCANNERDATA' ; OPTIONCOMPUTATION = 'TWS_OPTIONCOMPUTATION' ; ERROR = 'TWS_ERROR' ; TIME = 'TWS_TIME' ; CONNECTIONCLOSED = 'TWS_CONNECTIONCLOSED' ; COMMISSIONREPORT = 'TWS_COMMISSIONREPORT' ; MARKETRULE = 'TWS_MARKETRULE' ; HEADTIMESTAMP = 'TWS_HEADTIMESTAMP' ; FINANCIALADVISORY = 'TWS_FINANCIALADVISORY' ; FUNDAMENTALDATA = 'TWS_FUNDAMENTALDATA' ;

dakr001 commented 5 years ago

Despair2000 - thanks again for your insights :)

My reason for needing this is to compile a list of bond contracts. The symbols published on the IB website can't be used to search for the bond contracts.

Abel - can you please enable the SYMBOLSAMPLES event? Hopefully you read this thread.

Regards.

softwarespartan commented 5 years ago

Let me check what is needed to support this api call. Usually no problem but don’t want to over promise.

Sent from my iPhone

On Oct 8, 2019, at 3:48 AM, dakr001 notifications@github.com wrote:

Despair2000 - thanks again for your insights :)

My reason for needing this is to compile a list of bond contracts. The symbols published on the IB website can't be used to search for the bond contracts.

Abel - can you please enable the SYMBOLSAMPLES event? Hopefully you read this thread.

Regards.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

dakr001 commented 5 years ago

Thanks very much. Let me know if it's possible :)

softwarespartan commented 5 years ago

@dakr001 support for symbol sample added. please do a git pull to update.

dakr001 commented 5 years ago

@softwarespartan awesome, thank you very much!