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
  • GET logo images of coins
  • Best endpoint to get the latest price
  • Building a telegram bot to alert users on the latest coins listed on CoinGecko, which endpoint should I use?
  • GET all trading pairs (tickers) of a coin
  • GET trading pairs of specific coins from a specific exchange
  • GET list of coins under specific category
  • Identify a list of DEX decentralised exchanges
  • GET Bitcoin dominance data
  • GET the market cap or dominance of a specific ecosystem
  • GET all the coins of a specific blockchain network (by contract address)
  • GET the 7-day sparkline price data of a coin
  • I want to get a link to individual CoinGecko coin page, how do I do that?
  • How do I check if a coin status is still active on CoinGecko and if the price update is stale?
  • How do I get the real-time and historical exchange of BTC in USD?

Was this helpful?

  1. Getting Started

Common Use Cases

Below are some of the common use cases that might be useful to you.

PreviousEndpoint DemoNextError & Rate Limit

Last updated 1 year ago

Was this helpful?

GET logo images of coins

Use coins/{id} endpoint, e.g. . You can also use this endpoint to receive other metadata like: links, categories, contract address, community, description in different languages and more.

Best endpoint to get the latest price

Use coins/simple endpoint. e.g. . This endpoint can also return market data like market cap, 24hour trading volume and 24hour price change %. Note: the data update frequency (or cache) for Pro API is around 30-40 seconds. Public API may take 2 minutes or more to update the last price.

Building a telegram bot to alert users on the latest coins listed on CoinGecko, which endpoint should I use?

Use coins/list/new endpoint, it is the fastest endpoint to that return the latest coins (ids and activated time) added on CoinGecko. This is an exclusive endpoint for Pro API users, subscribe to any to access it. Note: the data update frequency (or cache) this endpoint is around 30 seconds.

GET all trading pairs (tickers) of a coin

Use coins/{id}/tickers, e.g.

GET trading pairs of specific coins from a specific exchange

To get trading pairs of Uniswap from Binance only, you may use coins/{id}/tickers or /exchanges/{id}/tickers and insert the right param to filter. e.g.

GET list of coins under specific category

Use /coins/markets and category parameter to filter. e.g. the links below help you to get all the coins that are tagged as 'stablecoins' and 'arbitrum ecosystem' on CoinGecko.com.

Identify a list of DEX decentralised exchanges

  1. uniswap is DEX
    "centralized":false

GET Bitcoin dominance data

"market_cap_percentage": {
      "btc": 39.3896058954608,

GET the market cap or dominance of a specific ecosystem

GET all the coins of a specific blockchain network (by contract address)

  1. Once you have identified the chain ID, replace the correct ID in this link below https://tokens.coingecko.com/<ID>/all.json . e.g.

 https://tokens.coingecko.com/arbitrum-one/all.json

Alternatively, you may also use /coins/list endpoint with the parameter include_platform=true. This allows you to view all the coins listed on CoinGecko, and their respective blockchain networks.

https://api.coingecko.com/api/v3/coins/list?include_platform=true

GET the 7-day sparkline price data of a coin

You may flag 'sparkline' parameter with the /coins/{id} and /coins/markets endpoints, for example:

https://api.coingecko.com/api/v3/coins/bitcoin?sparkline=true
https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=100&page=1&sparkline=true

I want to get a link to individual CoinGecko coin page, how do I do that?

web_slug data can be obtained in the following endpoints:

  • /coins/{id}

  • /coins/{id}/contract/{contract_address}

How do I check if a coin status is still active on CoinGecko and if the price update is stale?

To check if a price is stale, you may use one of the following methods:

  • use /coins/{id} endpoint , and look for 'last_updated' timestamp data.

  • use /simple/price endpoint, and insert the parameter include_last_updated_at=true to check the latest update time.

How do I get the real-time and historical exchange of BTC in USD?

To check the historical exchange rate, you may use /coins/{id}/history (or /coins/{id}market_chart) endpoint to get the historical price of BTC in USD on a specific date.

Use to get the full list of exchanges (id) on CoinGecko.com

Use /exchanges/{id} to find out if an exchange is centralized (CEX) or not (DEX). Repeat the same for other exchanges. e.g.

Use . It will show the total (global) market cap, as well as dominance % of BTC, ETH and more.

Use , it will also return their 24hour percentage change, which can be useful to know which category or ecosystem is receiving traction. You may also compare this endpoint against global market cap data.

First, you would have to identify the ID for the chain you are looking for using the . Note: only coins that have contract address added by the CoinGecko team will be shown. (Learn more )

You may insert the API id with this URL format: www.coingecko.com/en/coins/{web_slug} For example:

To check if a coin is active or not, you may refer to the endpoint, only active coins will be shown here.

To check the current exchange rate, you may use the /exchange_rates endpoint ().

πŸ”¨
https://api.coingecko.com/api/v3/coins/bitcoin
https://api.coingecko.com/api/v3/coins/bitcoin
paid plan
https://api.coingecko.com/api/v3/coins/uniswap/tickers
https://api.coingecko.com/api/v3/coins/uniswap/tickers?exchange_ids=binance
https://api.coingecko.com/api/v3/exchanges/binance/tickers?coin_ids=uniswap
https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&category=stablecoins&order=market_cap_desc&per_page=100&page=1&sparkline=false
https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&category=arbitrum-ecosystem&order=market_cap_desc&per_page=100&page=1&sparkline=false
https://api.coingecko.com/api/v3/exchanges/list
https://api.coingecko.com/api/v3/exchanges/uniswap_v3
https://api.coingecko.com/api/v3/global
https://api.coingecko.com/api/v3/coins/categories
https://www.coingecko.com/en/coins/bnb
/coins/list
test
asset platform endpoint
here