Hi,
I'm trying to use the API, but am running into rate limits. According to the docs, you have a maximum number of requests per 3 seconds per endpoint (except for creating a session), so upon receiving a 429, my code waits 5 seconds before repeating the request.
I would expect that waiting 5 seconds would cause this to no longer hit the rate limit.
Unfortunately, the second request also results in a 429. How can I recover? Restarting the app (which restarts the session) seems to help but seems to be a bit too much.
my logs:
DEBUG:urllib3.connectionpool:https://public-api.sandbox.bunq.com:443 "GET /v1/user HTTP/1.1" 429 None
WARNING:xxx.bunq:Got 429 ! Waiting 5 seconds before trying again!
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): public-api.sandbox.bunq.com:443
DEBUG:urllib3.connectionpool:https://public-api.sandbox.bunq.com:443 "GET /v1/user HTTP/1.1" 429 None