-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
validate tickers first #88
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this idea, left a comment
Returns a tuple of (is_valid, invalid_tickers). | ||
""" | ||
try: | ||
response = requests.get("https://virattt.github.io/datasets/financials/available_tickers.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just use https://www.sec.gov/files/company_tickers.json
Financial Datasets also has a /tickers/ endpoint for each API, but may be too heavy for now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that URL is not working I get:
Automated access to our sites must comply with SEC.gov's Privacy and Security Policy.
Please visit www.sec.gov/developer for more developer resources and Fair Access guidelines.
Please visit www.sec.gov/privacy for more information on Privacy Policy.
Reference ID: 0.8477d917.1739045494.29945d84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may need to add headers since its the SEC
this change validates the tickers before executing the API calls to prevent costs when entering an invalid ticker