How do I fetch the price data from CoinGecko?
Here is an example that will give you the simple price:

https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&amp;vs_currencies=usd

The page lets you try out the API by filling in the form fields. You can get the list of coin ids from:

https://api.coingecko.com/api/v3/coins/list

and the compare currencies from:

https://api.coingecko.com/api/v3/simple/supported_vs_currencies