Closed IsaacTrevino closed 8 months ago
@IsaacTrevino overall LGTM! Can you please adjust minor lint thing?
Linting check should work now 👍
2. Do you mind adding a test case for msg_type = "n" in test_websockets.py/test_cast to test the changes you've made in the _dispatch method?
@alessiocastrica , Okay I was able to remove those changes my linter did automatically for README.md
. Also I added the test_cast
as well as the _cast
method in websockets.py
. Being new to testing please let me know if I did this correct in my latest commit.
@alessiocastrica Alright, I was able to add the News
test case. Please look and let me know if you have any questions. I am excited to contribute to this repo as I plan to utilize it in my projects.
Edit:
It looks like News
model requires more work. I am investigating the cause now.
FYI ready for review
Sorry for taking time to review. Please let me have a time sometime sooner.
Sorry for taking time to review. Please let me have a time sometime sooner.
No problem, I was able to commit your suggestion.
Description
This pull request adds a powerful new feature to the Alpaca-py library: a real-time news data stream available via WebSocket subscription. This functionality lets users stay updated on market trends, relevant company news, and other events that could influence trading decisions.
Changes
NewsDataStream
class underalpaca.data.live.news
directorysubscribe_news
method to handle WebSocket subscriptionsMotivation
With the volatility of financial markets, staying informed is critical for casual traders and financial institutions. News can considerably impact trading decisions, making a real-time news data stream a valuable asset for any trading toolkit.
Usage Example
Here's a quick example to get you started with the new feature. This demonstrates how to subscribe to the news feed for a specific stock symbol:
Dependencies
Questions
Your feedback is welcome. It's the apple to our pie! 🍎 🥧
Let's merge this and make the Alpaca-py library not just better but utterly unmissable. 🦙