Skip to content

Instantly share code, notes, and snippets.

@diveyez
Forked from janlukasschroeder/sec-api.py
Created January 30, 2022 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diveyez/06d53ccba7f145a257b8d3caa5fd7c69 to your computer and use it in GitHub Desktop.
Save diveyez/06d53ccba7f145a257b8d3caa5fd7c69 to your computer and use it in GitHub Desktop.
SEC Filings API - Python 3.x Example
from sec_api import QueryApi
queryApi = QueryApi(api_key="YOUR_API_KEY")
query = {
"query": { "query_string": {
"query": "ticker:TSLA AND filedAt:{2020-01-01 TO 2020-12-31} AND formType:\"10-Q\""
} },
"from": "0",
"size": "10",
"sort": [{ "filedAt": { "order": "desc" } }]
}
filings = queryApi.get_filings(query)
print(filings)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment