Skip to content

Instantly share code, notes, and snippets.

@fluffybeing
Created October 2, 2014 08:47
Show Gist options
  • Save fluffybeing/8a4328244434f774d3fb to your computer and use it in GitHub Desktop.
Save fluffybeing/8a4328244434f774d3fb to your computer and use it in GitHub Desktop.
SECEdgar example
import time
from SECEdgar.crawler import SecCrawler
def get_filings():
t1 = time.time()
# create object
seccrawler = SecCrawler()
companyCode = 'AAPL' # company code for apple
cik = '0000320193' # cik code for apple
date = '20010101' # date from which filings should be downloaded
count = '10' # no of filings
seccrawler.filing_10Q(str(companyCode), str(cik), str(date), str(count))
seccrawler.filing_10K(str(companyCode), str(cik), str(date), str(count))
seccrawler.filing_8K(str(companyCode), str(cik), str(date), str(count))
seccrawler.filing_13F(str(companyCode), str(cik), str(date), str(count))
t2 = time.time()
print "Total Time taken: ",
print (t2-t1)
if __name__ == '__main__':
get_filings()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment