alpacahq / alpaca-trade-api-python

Python client for Alpaca's trade API
https://pypi.org/project/alpaca-trade-api/
Apache License 2.0
1.73k stars 534 forks source link

Only call the news handler once for a single message #693

Closed gnvk closed 1 year ago

gnvk commented 1 year ago

Caused by #691

fumoboy007 commented 1 year ago

Isn’t this not the desired behavior?

Consider the case where a caller registers one handler for one symbol and a different handler for another symbol. If there is a news article that is related to both symbols, only one of the handlers would be called due to this change.

fumoboy007 commented 1 year ago

I think we should still try to call all of the handlers but avoid calling the same handler twice.

gnvk commented 1 year ago

@fumoboy007 👍 https://github.com/alpacahq/alpaca-trade-api-python/pull/694