Last active
June 12, 2022 13:36
-
-
Save janlukasschroeder/09e851830ed91409e6b89e3a9b2aa036 to your computer and use it in GitHub Desktop.
SEC Filings API - Python 3.x Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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\"", | |
"time_zone": "America/New_York" | |
} }, | |
"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
Below is the output i got.
{'total': {'value': 0, 'relation': 'eq'}, 'query': {'from': 0, 'size': 10}, 'filings': []}