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
[Bug] Unable to pull multiple earnings reports using for loop #6239
Comments
Hello, Can you check your Polygon API key privileges and make sure that you're not being rate-limited? I can't reproduce this on my end completely as I'm not sure what
|
It looks like the free plan for Polygon as the source allows 5 API calls per minute, so there does appear to be rate limiting going on. |
Can you show me the full exception that is being thrown, please? |
FYI, Polygon uses a period for share classes and not a "-". |
I'm trying to write a for loop to pull cash statements for all the tickers in the NYSE. The for loop below contains a try-except block for when quarterly cash statements for a given ticker cannot be returned from Polygon from the last ten years:
A sample of the output is shown below, with the following tickers not having cash statements available as the for loop is executing:
Note that "JPM not available" is underlined. The quarterly cash statements from the last 10 years couldn't be pulled using the for loop. However, when I call the code below to pull JPM's cash statements, I do get an output:
obb.equity.fundamental.cash('JPM', provider="polygon", limit=40, period='quarter').to_df()
(The dataframe has been truncated for the sake of brevity.)
Do you know what could be causing this inconsistency, for the stand-alone cash statement query to work for JPM but not when it's run in a for loop? Is there a better way you would recommend pulling the cash statements for multiple tickers? Thanks.
The text was updated successfully, but these errors were encountered: