yahooquery
yahooquery copied to clipboard
all_financial_data doesn't work for quarterly data.
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
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
same here, any solution for this issue?
Works for me. Linux, yahooquery 2.3.1, python 3.10.11
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)
@benhowell I get HTTP 404 Not Found
errors on quotes, too. But this question concerned all_financial_data().
@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
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.
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.