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

all_financial_data doesn't work for quarterly data. #191

Open
alBronko opened this issue May 22, 2023 · 8 comments
Open

all_financial_data doesn't work for quarterly data. #191

alBronko opened this issue May 22, 2023 · 8 comments

Comments

@alBronko
Copy link

all_financial_data doesn't work for quarterly data.

from yahooquery import Ticker
aapl = Ticker('aapl')
aapl.all_financial_data('q')
{'error': 'HTTP 404 Not Found. Please try again'}
stopped working on May 15th.

it works like this:
from yahooquery import Ticker
aapl = Ticker('aapl')
aapl.all_financial_data()

Desktop (please complete the following information):

  • linux
  • Python 3.10.6
  • yahooquery-2.3.1
@benhowell
Copy link

Same issue is occurring for me with quotes (only started less than 24 ago):

from yahooquery import Ticker
aapl = Ticker('aapl')
q = aapl.quotes
print(q)
HTTP 404 Not Found

Desktop (please complete the following information):

linux
Python 3.10.6
yahooquery-2.3.1

@Aillian
Copy link

Aillian commented Jun 9, 2023

same here, any solution for this issue?

@ms82494
Copy link

ms82494 commented Jun 28, 2023

Works for me. Linux, yahooquery 2.3.1, python 3.10.11

@benhowell
Copy link

benhowell commented Jun 29, 2023

Works for me. Linux, yahooquery 2.3.1, python 3.10.11

I just re-ran the code above and it still doesn't work.
Can you post the output of this code:
from yahooquery import Ticker
aapl = Ticker('aapl')
q = aapl.quotes
print(q)

@ms82494
Copy link

ms82494 commented Jun 30, 2023

@benhowell I get HTTP 404 Not Found errors on quotes, too. But this question concerned all_financial_data().

@benhowell
Copy link

benhowell commented Jun 30, 2023

@benhowell I get HTTP 404 Not Found errors on quotes, too. But this question concerned all_financial_data().

Ah, sorry, I misread!
Thanks for update though, I appreciate it.

The quotes issue is further discussed here: #192

@ms82494
Copy link

ms82494 commented Jun 30, 2023

I just started to notice the same problem. Maybe this is indeed similar to the quotes problem #192, as @benhowell suggested. I tried it with and without YF+ session crumb and with and without user_agent, and neither seems to make a difference.

@dpguthrie
Copy link
Owner

After doing some debugging, it looks like the request is returning a 431 status code due to an incredibly long request header. This endpoint accepts a query parameter type which you then specify in a comma delimited list all of the "types" you want returned. The annual one appears to work because it doesn't hit the same limit as quarterly.

The fix would most likely be to split the list in two and make two separate requests for each symbol. This is probably still slightly better than calling each individual financials method to return the same set of data.

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

5 participants