-
Notifications
8000
You must be signed in to change notification settings - Fork 269
Example code fails to run fully #594
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
Comments
Hi @daxm, I was able to run the example code without error using a Starter API key. This appears to be happening because you're making more than 5 API calls per minute on the Free tier. If you break this script down into individuals calls To help with debugging, you can see what requests are being made by turning on request tracing, update your client to |
Yes, that was my guess too. My point is that maybe the example should be set up such that free API key users can at least run the example without error. Maybe have a super simple example and then a more advanced one (with a warning to the free tier people that their code might fail). Or, write into the example code to deal with 429 retry situations. (I've written them into my requests method in my API SDK packages I've written in the past so maybe a code update in polygon?) |
Yeah, I totally agree. Can you link to that example you're talking about (and I'll update it)? We have the easy one off example scripts here https://github.com/polygon-io/client-python/tree/master/examples/rest for everyone to try. |
It is in the readme. Basically I copy/pasted it into my def main() function. |
Hey @daxm the script you posted isn't in the https://github.com/polygon-io/client-python/blob/master/README.md. Or, did you stick the examples together just by copy/pasting the sections? |
It is there. In the "Using the Client" section. Not my WHOLE script but the code in the main() function. |
Ah, I see what you're saying. Yeah, I'll add a note to the readme about API keys and what to expect. Thanks for reporting this. Sorry about the confusion here. |
Describe the bug
The example code listed in the README runs BUT will fail near the end. My guess is because my "free" API key is hitting its query limit.
To Reproduce
Expected behavior
The file should run without error/crashing.
Screenshots
This code will error using a "free" API key:
I'm guessing that reducing the 'limit' value from 50,000 to just 5000 would fix the problem. I cannot confirm this as now I can't run any queries. (I waited over 30 minutes to try again but am still getting 429 errors.)
The text was updated successfully, but these errors were encountered: