dpguthrie / dpguthrie/yahooquery
Ticker.p_all_financial_data() only returns all the financials data of the last cycle
- Dominant language
- Python
- Stars
- 920
- Forks
- 164
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Ticker.p_all_financial_data() only returns all the financials data of the last cycle
**To Reproduce**
My code:
```
from yahooquery import Ticker
import json
def json_serial(obj):
if hasattr(obj, 'isoformat'):
return obj.isoformat()
raise TypeError(f"Type {type(obj)} not serializable")
symbol = 'AAPL'
stock = Ticker(symbol, username='user', password='password')
all_financial_data = stock.p_all_financial_data(frequency='q')
with open(f'{symbol}_all_financials.json', 'w', encoding='utf-8') as f:
json.dump(all_financial_data.to_dict(), f, ensure_ascii=False, indent=4, default=json_serial)
print(f"All data has been saved to {symbol}_all_financials.json")
```
**Expected behavior**
In the doc, it should return all financials data of all the years
**Screenshots**
-
**Desktop (please complete the following information):**
- OS: MacOS
Contributor guide
Assessment
This issue has not been assessed yet.