CoinGecko API Guide
Public API Pro APIPricing Enterprise
  • Getting Started
    • 🦎Introduction
    • πŸš€Getting Started
    • πŸ”‘Authentication
    • πŸ“”Endpoint Overview
    • πŸ§ͺBest Practices
    • πŸŽ“10-min Tutorial Guide
      • #1: Get Data by ID or Address
      • #2: Get Historical Data
      • #3: Get Exchanges & NFT Data
    • πŸ“ΌEndpoint Demo
    • πŸ”¨Common Use Cases
    • ⚠️Error & Rate Limit
  • Exclusive Endpoints
    • πŸ‘‘Pro-API
    • for Paid Plan subscribers
    • for Enterprise-plan clients
  • Others
    • πŸ’œDEX Data API
    • πŸ•Changelog
    • 🟒API Status
    • πŸ‘©β€πŸ«Tutorials (beginner-friendly)
    • πŸ’ΌCase Studies
    • πŸ•ΈοΈClients (Unofficial)
    • ❓FAQs & Useful Links
Powered by GitBook
On this page
  • 1. Using 'discovery' endpoint to retrieve coins that you're interested in. e.g.:
  • 2. Using 'data' endpoint to get data that you need. e.g.:

Was this helpful?

  1. Getting Started

Best Practices

PreviousEndpoint OverviewNext10-min Tutorial Guide

Last updated 2 years ago

Was this helpful?

Here's an example of how a CG API user would usually use different endpoints together:

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.:

/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.

Want to understand better and become a CoinGecko API pro within just 10 minutes? Try out the tutorial guide in the next page!

Test:

Test:

/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 parameter, e.g. 'usd'.

Test:

Test:

Test:

Note: other than 'id', you may also use contract address to query the data that you need. You may learn more about this in .

πŸ§ͺ
https://api.coingecko.com/api/v3/coins/list
https://api.coingecko.com/api/v3/search/trending
supported_currencies
https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd
https://api.coingecko.com/api/v3/coins/bitcoin
https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=1
our tutorial
The flow above is also applicable to get data of exchanges, nfts, and derivatives.