client-python icon indicating copy to clipboard operation
client-python copied to clipboard

Max retries exceeded with url

Open greengooru opened this issue 2 years ago • 2 comments

I am receiving this message Max retries exceeded with url for all my calls with this code:

    for a in client.list_aggs(ticker='MSFT', multiplier=1, timespan="hour", from_="2023-07-29", to="2024-06-01"):
        aggs.append(a)
    print(aggs)

I try to download a year of this Historical Data, however I receive the above message for all calls.

I am aware that there is a API Call Limit of 5 per minute, but I am using a Starter package which is supposed to have Unlimited API calls. Probably this is not a bug in the System. But how can I get this solved?

Additional information: If I reduce the time span to a few days, it all works normally. If this is the normal usage, then the question is what is the max range of data that can be requested for any given call?

These lines work normally (15 days of data):

    for a in client.list_aggs(ticker='MSFT', multiplier=1, timespan="hour", from_="2023-05-15", to="2024-06-01"):
        aggs.append(a)
    print(aggs)

Thank you.

greengooru avatar Jun 11 '24 14:06 greengooru

Thanks for reporting @greengooru. I'll explore this. Do you mind turning on tracing in the client and then posting the results here of the headers? This will let me find your request and see what was going on.

https://github.com/polygon-io/client-python#how-to-enable-debug-mode

client = RESTClient(trace=True)

justinpolygon avatar Jun 11 '24 18:06 justinpolygon

Hello, I'm going to close this as unreproducible. But, if you're able to get this to fail again please let me know and we'll debug it.

justinpolygon avatar Jun 19 '24 16:06 justinpolygon