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) |
Hi Jan,
I want to get the fund prospectus using the below. But couldnt , could you please advise if I am missing something here ?
from sec_api import QueryApi
queryApi = QueryApi(api_key="included my key here")
query = {
"query": { "query_string": {
# "query": "companyName:"1290 SmartBeta Equity Fund""
"query": "ticker:"TNBIX""
} },
"from": "0",
"size": "10",
"sort": [{ "filedAt": { "order": "desc" } }]
}
filings = queryApi.get_filings(query)
print(filings)
Below is the output i got.
{'total': {'value': 0, 'relation': 'eq'}, 'query': {'from': 0, 'size': 10}, 'filings': []}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
Thanks for the code.
Is there a python API to fetch analysts ranking from TipRanks.com ?
Thanks