Skip to main content

Easily Download Financial Data reported to SEC

Project description

secdata : All Data reported to the Securities and Exchange Commission

About

A module to easily Download Financial Data reported to the Securities and Exchange Commision (SEC).

It deploys SEC's RESTful APIs, which delivers JSON-formatted data without requiring authentication or API keys.

Currently included in the APIs are the submissions history by filer and the XBRL data from financial statements (forms 10-Q, 10-K,8-K, 20-F, 40-F, 6-K, and their variants).

The JSON structures are updated throughout the day, in real time, as submissions are disseminated.

More info about the APIs can be found here

Installation

Binary installers are available at PyPI (Python Package Index) .

pip install secdata

For a manual installation, source code is hosted on Github.

Methods

  • fetch_companies_info(return_dataframe = False , file_if_info_already_downloaded = "companiesinfo.csv") :

    Sets the sec_companies_info property, Which is a table containing:

    • CIK (Central Index Key)
    • Ticker (AAPL, MSFT, TSLA, etc.) and
    • Name (Apple Inc., MICROSOFT CORP, Tesla, etc) .

    for each company reporting to the SEC

    From that table one can find CIKs of interest in order to use them in the fetch_facts() method

  • fetch_facts(ciks) : All Sec Facts (e.g. Assets, Depreciation, Net Income, Number of Shares) available for the companies of which the ciks are provided

Example

#Import Class
from secdata import SecFactsDownloader

#Initiate Downloader
my_downloader = SecFactsDownloader("my_email@my_domain.com")

#Download Central Index Key per company
#To find CIKs of interest
my_downloader.fetch_companies_info()


#320193 for Apple, 789019 for Microsoft, 1652044 for Google
df_1 = my_downloader.fetch_facts([320193, 789019, 1652044])

#1318605 for Tesla, 37996 for Ford
df_2 = my_downloader.fetch_facts([1318605, 37996])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

secdata-0.0.2.3.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

secdata-0.0.2.3-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file secdata-0.0.2.3.tar.gz.

File metadata

  • Download URL: secdata-0.0.2.3.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for secdata-0.0.2.3.tar.gz
Algorithm Hash digest
SHA256 19a03a7860a51b684003bc2e3176bddb312244a1ddf34c1ccd7e7033a8e3e9e2
MD5 755b44e62fb9bbe8c2046c85f8a5e00b
BLAKE2b-256 0b3af66be2c964534b7ed28c3672e5e5c8343e7c3e97c39e778dccad3cd9985e

See more details on using hashes here.

File details

Details for the file secdata-0.0.2.3-py3-none-any.whl.

File metadata

  • Download URL: secdata-0.0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for secdata-0.0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d28c28c202026ceabf58daf6495b2937573dcac48181705da7365d64b0719791
MD5 37b9ea873e8b3bb7a5e62de0c759368a
BLAKE2b-256 660b6cbac93390268e10a6bb19922aa79badcbd844c6fe70732911ae369c656a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page