alexgolec / tda-api

A TD Ameritrade API client for Python. Includes historical data for equities and ETFs, options chains, streaming order book data, complex order construction, and more.
https://tda-api.readthedocs.io
MIT License
1.26k stars 335 forks source link

Added actives functions to StreamClient. #324

Open eu90h opened 1 year ago

eu90h commented 1 year ago

This patch adds a few functions to StreamClient to collect active issue messages. All subscriptions receive the appropriate messages and I've used one of the endpoints for a number of weeks now with no problems. The new functions are invoked just like any other StreamClient subscription function. For example, in order to subscribe to the NASDAQ's most active issues for the entire trading day, call await stream_client.actives_nasdaq_subs(["NASDAQ-ALL"]).

Hopefully everything looks OK -- I can make any necessary changes.