Last active
June 13, 2022 09:49
-
-
Save janlukasschroeder/2d1e297f07d0152ebf4ad9b112b2cd3b to your computer and use it in GitHub Desktop.
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 ExecCompApi | |
execCompApi = ExecCompApi("YOUR_API_KEY") | |
# Get data by ticker | |
result_ticker = execCompApi.get_data("TSLA") | |
# Get data by CIK | |
result_cik = execCompApi.get_data("1326801") | |
# List all exec compensations of CIK 70858 for year 2020 and 2019 | |
# Sort result by year first, by name second | |
query = { | |
"query": {"query_string": {"query": "cik:70858 AND (year:2020 OR year:2019)"}}, | |
"from": "0", | |
"size": "200", | |
"sort": [{"year": {"order": "desc"}}, {"name.keyword": {"order": "asc"}}], | |
} | |
result_query = execCompApi.get_data(query) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment