tosunthex/CoinGecko

Pro API Support

OxfordGrid opened this issue · 3 comments

Paid subscription to the CG Api makes requests to a different API endpoint:
https://pro-api.coingecko.com/api/v3
Another change is an addition of the "x_cg_pro_api_key" access key at the end of each request.

It would be great to have this support out of the box. For example if there were a constructor that took the key as a parameter and based on it automatically selected the endpoint.

Example:
curl https://pro-api.coingecko.com/api/v3/ping?x_cg_pro_api_key=YOUR_API_KEY

I can make this change but i cant test it because i dont have any paid subscription :(

If you can help me we can help together

My paid subscription expired yesterday :( I did a quick a dirty change for this to work, so happy to review a PR to make sure it's aligned to what worked for me.

Added by @mak5577