ranaroussi / yfinance

Download market data from Yahoo! Finance's API
https://aroussi.com/post/python-yahoo-finance
Apache License 2.0
13.02k stars 2.31k forks source link

websocket support for ticker feeds #290

Open wolfinch opened 4 years ago

wolfinch commented 4 years ago

Thank you for the wonderful work on yfinance apis. So yahoo finance seems to be using websocket for streaming ticker updates. I didn't see that supported in the library. That would be an amazingly efficient way of getting ticker updates. Are there any thoughts on that? any work happening?

alparamonov commented 4 years ago

I've also bumped into this limitation. I've created a package which does this:

GitHub repo Package page

wolfinch commented 4 years ago

thank you ! I implemented that myself too. I was planning to create a PR for this. but I need to find time clean it up a bit. If yours is in a good shape, please create a PR

Thanks!

On Wed, May 27, 2020 at 5:14 PM Alexey Paramonov notifications@github.com wrote:

I've also bumped into this limitation. I've created a package which does this:

GitHub repo https://github.com/yahoofinancelive/yliveticker Package page https://pypi.org/project/yliveticker/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ranaroussi/yfinance/issues/290#issuecomment-635011983, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZSILRYKAFJ3GH7RFH7BNDRTWUERANCNFSM4MY6S7YA .

-- -joe-

wolfinch commented 4 years ago

btw, did you understand all the message fields in the proto definition? What are the call/put option types used for ? I am very interested in getting option chain updates, these sounds related to that. But I haven't figured out a way to subscribe for that. Do you have any idea?

On Thu, May 28, 2020 at 11:33 AM Joshith Rayaroth Koderi joe.cet@gmail.com wrote:

thank you ! I implemented that myself too. I was planning to create a PR for this. but I need to find time clean it up a bit. If yours is in a good shape, please create a PR

Thanks!

On Wed, May 27, 2020 at 5:14 PM Alexey Paramonov notifications@github.com wrote:

I've also bumped into this limitation. I've created a package which does this:

GitHub repo https://github.com/yahoofinancelive/yliveticker Package page https://pypi.org/project/yliveticker/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ranaroussi/yfinance/issues/290#issuecomment-635011983, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZSILRYKAFJ3GH7RFH7BNDRTWUERANCNFSM4MY6S7YA .

-- -joe-

-- -joe-

alparamonov commented 4 years ago

If yours is in a good shape, please create a PR

Good idea. I will have a look in it. For now, it's packaged as pip separately but very easy to import.

But I haven't figured out a way to subscribe for that. Do you have any idea?

Just some key fields only. :) Would be great to have a full manual also with links to financial terms and meaning of them.

dgnsrekt commented 4 years ago

@alparamonov What are the limitations on the websocket api? Basically what is the max amount of tickers you are allowed to follow from the same ip?

alparamonov commented 4 years ago

@dgnsrekt difficult to say for sure because I haven't found any Yahoo Finance API docs. I've tested with 200 NASDAQ tickers and it seems to be working fine. See the console output from the method for approximately 30 seconds of listening

silvavn commented 3 years ago

@alparamonov I'm questioning whether this should be integrated since there is a separate package for live ticker and I am not sure that yfinance intended purpose is to collect live data.

alparamonov commented 3 years ago

@silvavn valid point. if yfinance is thought only for retrospective data and not just wrapping yahoo finance api, then I agree. I thought it could be a gap in yfinance functionality. Feel free to reject PR.

Karlheinzniebuhr commented 2 years ago

+1