softwarespartan / IB4m

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

reqRealTimeBars #21

Open ciaoitaly opened 6 years ago

ciaoitaly commented 6 years ago

hello is it possible to request that function from IB API using IB4m?

softwarespartan commented 6 years ago

Hi Ciaoitaly

Yes, it is possible.

cheers -abel

On Mar 15, 2018, at 12:25 PM, ciaoitaly notifications@github.com wrote:

hello is it possible to request that function from IB API using IB4m?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/softwarespartan/IB4m/issues/21, or mute the thread https://github.com/notifications/unsubscribe-auth/AEWq1Kc2nIHASdm1yRMtNfwOUBu-KtHlks5tepYKgaJpZM4Ssd_-.

ciaoitaly commented 6 years ago

May I ask you how?

softwarespartan commented 6 years ago

There should be examples in the IB4m docs.

And Interactive Brokers docs here:

https://interactivebrokers.github.io/tws-api/realtime_bars.html#gsc.tab=0 <https://interactivebrokers.github.io/tws-api/realtime_bars.html#gsc.tab=0>

-abel

On Mar 15, 2018, at 12:37 PM, ciaoitaly notifications@github.com wrote:

May I ask you how?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/softwarespartan/IB4m/issues/21#issuecomment-373441201, or mute the thread https://github.com/notifications/unsubscribe-auth/AEWq1NbGV4xFRd__p__pFLORBubsqBwyks5tepiygaJpZM4Ssd_-.

ciaoitaly commented 6 years ago

Ok thank you so much, I will look into this and thank you for putting all of this together !

bondtrade commented 4 years ago

Hi,

What's the listener for this please? MARKETDATA doesn't seem to work:

        obj.listenerMktData = event.listener(TWS.Events.getInstance, TWS.Events.MARKETDATA, @(~, e) obj.updateBars(e.event.data));
            obj.twsSession.eClientSocket.reqRealTimeBars(obj.contracts.conId(i), contract, 5, 'TRADES', 1, []);

Thank you.

softwarespartan commented 4 years ago

Can you share error?

Sent from my iPhone

On Mar 3, 2020, at 10:10 PM, bondtrade notifications@github.com wrote:

 Hi,

What's the listener for this please? MARKETDATA doesn't seem to work:

    obj.listenerMktData = event.listener(TWS.Events.getInstance, TWS.Events.MARKETDATA, @(~, e) obj.updateBars(e.event.data));
        obj.twsSession.eClientSocket.reqRealTimeBars(obj.contracts.conId(i), contract, 5, 'TRADES', 1, []);

Thank you.

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

ciaoitaly commented 4 years ago

session = TWS.Session.getInstance(); [databuf,datalh] = TWS.initBufferForEvent(TWS.Events.REALTIMEBAR,50); lherr  = event.listener(TWS.Events.getInstance, TWS.Events.ERROR, @(s,e)disp(e.event.data)); session.eClientSocket.eConnect('',7001,0);  contract = com.ib.client.Contract(); % define contract specs reqId=0; session.eClientSocket.reqRealTimeBars(reqId,contract,0,'TRADES',0,[]);

bondtrade commented 4 years ago

Thank you sir. Up and running! 👍🙏