dgunning / edgartools

Navigate SEC Edgar data in Python
MIT License
449 stars 88 forks source link

[bug/feature] fetch latest filings #11

Closed edwardsun closed 1 year ago

edwardsun commented 1 year ago

Hi,

I‘m recently trying to see if it is possible to fetch latest data via edgartools. eg. I was looking at https://www.sec.gov/cgi-bin/browse-edgar?company=&CIK=&type=4&owner=only&count=40&action=getcurrent and try to get the latest records with exact accepted date time. However, it seems edgartools' most recent records only went up to "yesterday" not "today". I also tried edgar.get_by_accession_number but cannot find a specific "today's" record.

Would it be possible to achieve "live" records fetching using edgartools?

Thank you for the great tool.

dgunning commented 1 year ago

I will take a look. Mostly likely today's filings are not yet in the filing index but I have to test. If so there might be a way to get the absolute latest. Won't promise but will try given how useful that use case might be

dgunning commented 1 year ago

By design the library only accesses filings that are in the latest filing indexes, meaning for the latest day for which data is available, only filings before the 5:30PM cutoff will be included.

To implement the get_current call to get the post-cutoff filings will be a feature. Likely it will be a separate api call e.g. get_current_filings. If this turns out to ge easy to implement, then it may be merged into get_filings, and get_by_accession_number, but I won't know until I start.

I will look at this next week

dgunning commented 1 year ago

Add get_current_filings in 2.1.0. Will improve with cik and other filters in future minor releases