man-c / pycoingecko

Python wrapper for the CoinGecko API
MIT License
1.04k stars 268 forks source link

Too many requests? #76

Open pir8radio opened 1 year ago

pir8radio commented 1 year ago

CoinGecko is rate limiting me.. In my python i am only performing ONE request every 120 seconds... but when i wireshark the API calls you are making there is MANY.. Coingecko shared with me their logs as well and they are seeing many requests (80-100) every 120 seconds. first image below is from coingecko, second image is wireshark showing TWO of about 80+ requests pycoingecko is making at one time.. any idea how this is happening? Here is my python source, should display cached data (which it does) then it expires the data after 120 seconds and is supposed to do 1 api call, update the cache, and serve from cache going forward.. is my code crap? or is it pycoingecko? https://github.com/pir8radio/signum-explorer/blob/master/scan/caching_data/exchange.py

image image

pir8radio commented 1 year ago

@man-c let me know if you see anything wrong with my code, or if this is a potential pycoingecko issue.. I can't figure it out, and may need your python expertise.