开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

groups of events into one event


 

Hi,
When using TickerUpdateEvent, or pendingTickersEvent, is there a way to collect individual stock events into a grouped event......for example if I have 10 stocks in a portfolio that is streaming ticks but i want an event to occur only over a set of say 5 of those stocks. I seem to remember seeing something from Ewald where he collected several events into 1....maybe Im not remembering correct as i cant find it now!!!
?
Asking the question an alternate way, what would be the most efficient/fastest way for say 2 sets of 5 stock portfolios to respond to events over their respective holdings, and not have to also filter through the events of the other 5 also?
?
Thanks
B.


 

开云体育

Hi,

You can use the event that is on the ticker.

You are referring to the ib_async.IB() events, which will emit updates for any ticker that is active. But there is a ticker event too, which will only emit when that particular ticker has updates. Which is what I think you are asking for



So use the Ticker.updateEvent of the individual ticker. By the way in eventkit there si a notebook with examples on how to use events. There are plenty of examples on how aggregate and disaggregate events.

Cheers


On 17 Mar 2025, at 05:51, in_woolloomooloo via groups.io <brendan.t.sands@...> wrote:

Hi,
When using TickerUpdateEvent, or pendingTickersEvent, is there a way to collect individual stock events into a grouped event......for example if I have 10 stocks in a portfolio that is streaming ticks but i want an event to occur only over a set of say 5 of those stocks. I seem to remember seeing something from Ewald where he collected several events into 1....maybe Im not remembering correct as i cant find it now!!!
?
Asking the question an alternate way, what would be the most efficient/fastest way for say 2 sets of 5 stock portfolios to respond to events over their respective holdings, and not have to also filter through the events of the other 5 also?
?
Thanks
B.


 

Thanks so much. I didn’t know about the event kit notebook…..that will be useful, or the ticker event.