Links
🧪

Best Practices

Here's an example of how a CG API user would usually use different endpoints together:
The flow above is also applicable to get data of exchanges, nfts, and derivatives.

1. Using 'discovery' endpoint to retrieve coins that you're interested in. e.g.:

/coins/list - to get the full list of coins on CoinGecko.com (and their respective 'id'). The ids are the main unique identifier for all the crypto assets.
/search/trending - to get the coins that are now trending on CoinGecko.com
​

2. Using 'data' endpoint to get data that you need. e.g.:

/simple/price - to get the latest price and market data of specific coin, based on the coin 'id' that you obtain from 'discovery' endpoints above. For this endpoint to work, you will also need to specify the supported_currencies parameter, e.g. 'usd'.
/coins/{id} - to get the metadata of a coin: logo images, description in different languages, websites, social media links and more.
/coins/{id}/market_chart - to get the historical price and market data of a coin.
​ ​
Note: other than 'id', you may also use contract address to query the data that you need. You may learn more about this in our tutorial.
​
Want to understand better and become a CoinGecko API pro within just 10 minutes? Try out the tutorial guide in the next page!