Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requests to yahoo finance take way too long to be responded via yfinance, while sending the same request via postman is responded instantly #1878

Open
ahnazary opened this issue Mar 6, 2024 · 0 comments

Comments

@ahnazary
Copy link

ahnazary commented Mar 6, 2024

Describe bug

Getting financial data sometimes takes way too longThe source of issue lies in this line. The session.get (...)uses IPv6 which some times does not work, while IPv4 works. (also discussed in this answer)

Simple code that reproduces your problem

Executing this piece of code a couple of times(or requesting any other financial data) even without surpassing yahoo finance's API constraint, will cause the next calls to yahoo finance really slow.

import yfinance as yf

ticker = yf.Ticker("AAPL")

ticker.quarterly_financials

Debug log

No bug logs, just takes too long to response.

Bad data proof

No response

yfinance version

yfinance==0.2.37

Python version

Python 3.11.4

Operating system

MacOS

@ahnazary ahnazary changed the title Requests to yahoo finance take way too long to be responded, while sending the same request via postman is responded with no issues Requests to yahoo finance take way too long to be responded via yfinance, while sending the same request via postman is responded with no issues Mar 6, 2024
@ahnazary ahnazary changed the title Requests to yahoo finance take way too long to be responded via yfinance, while sending the same request via postman is responded with no issues Requests to yahoo finance take way too long to be responded via yfinance, while sending the same request via postman is responded instantly Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant