ranaroussi / yfinance

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

Request: Support for SEC filings module #2007

Open dmoklaf opened 3 months ago

dmoklaf commented 3 months ago

Originally posted by @dmoklaf in https://github.com/ranaroussi/yfinance/discussions/2004

It seems a stock's SEC filings can be retrieved through the secFilingsmodule:

filings = quote._fetch(  # pylint: disable=W0212
    quote.proxy, modules=["secFilings"]
)
if filings is not None:
    filings = filings["quoteSummary"]["result"][0]["secFilings"]["filings"]
    for filing in filings:
        url = filing["edgarUrl"]
        type_ = filing["type"]
        title = filing["title"]
        timestamp = filing["epochDate"]
        date = datetime.datetime.fromtimestamp(timestamp, tz=datetime.UTC)
        symbols = filing.get("relatedTickers")
        # Do something with the filing...

Would it be possible to include this as a new feature within yfinance?