Getting Live Data

I am currently working on a senior project and I have decided to make a stock trading algorithm using python and Alpaca. I was wondering if there is an elegant way of getting stock prices to update as they are happening? I have yet to find a solution to this.

Hi there. One approach would be to use Alpaca’s StreamConn class, which is included in their python SDK, to consume real-time tick data (or one-second aggregates). See the following links for implementation details:

1 Like

Thank you for telling me about this! Yet I have been looking at this all day and have yet to figure out how to use streamconn. Is there an example that you could provide on how this works? The ones that have found do not example it in any way and I am having a hard time applying it to my list of tickers.