Closed convergenceIM closed 3 years ago
Hi @convergenceIM, thanks for bringing this to my attention. The SEC Edgar Full Text search API does not seem like it handles tickers very well, but it handles CIKs very nicely. If you substitute SPY
for its corresponding CIK 0000884394
, you get all the NPORT-P forms for it (there are 6 available for SPY):
env ❯ python3
Python 3.9.2 (default, Mar 26 2021, 23:22:38)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from sec_edgar_downloader import Downloader
>>> dl = Downloader()
>>> dl.get("NPORT-P", "0000884394")
6
Does this help? I wish the ticker searches were more accurate, but it seems like the SEC Edgar system performs better when a unique CIK is provided :).
Thanks for writing / sharing this package. It's clean and useful! I'm mainly trying to get NPORT-P files and am only able to get the two most recent for any symbol I search. It doesn't seem to be a problem of getting rate limited or banned since I'm able to get many more of other file types, and get zero NPORT files if I request for a date range that doesn't include the two most recent.
ticker = 'SPY'
dl.get("10-Q", ticker)# returns 12 files
dl.get("NPORT-P", ticker)# returns two files