man-c / pycoingecko

Python wrapper for the CoinGecko API
MIT License
1.05k stars 272 forks source link

Add api limit rate #30

Closed Acid3croco closed 3 years ago

Acid3croco commented 3 years ago

Hello, i've added a rate limit handling on __request() to prevent 429 from coingecko API

man-c commented 3 years ago

Great! Thanks for contributing! I have merged it to a feature branch (feature/rate_limit). It might be merged to the develop branch or remain as a standalone branch, because I am not sure if this kind of errors should be handled by the wrapper (since these are options that might change later from the API and I think they should be handled by the user and not the wrapper). In any case, it can be very useful to have it as feature in another branch to be used by users or for reference on how to handle the api limit rate.

Acid3croco commented 3 years ago

Hey,

Ok I understand, in fact default is to 100/min as said in the doc but right now it is more like 40/min from my tests so one needs to configure it yea

Thanks anyway

CharlesFr commented 2 years ago

Could this be merged in master? I'm facing 429 rate limit and this would very helpful.