π Common Use Cases
Discover the common use cases of CoinGecko API by our users
1. Get Coins Logo Images
- Use /coins/{id} endpoint
- This endpoint can be used to query other coin's metadata like: links, categories, contract address, community, description in different languages and many more
2. Best Endpoint for Latest Crypto Price
- Use /simple/price endpoint
- This endpoint can be used to query other market data like market cap, 24-hour trading volume and 24-hour price change percentage
3. Get All Trading Pairs (Tickers) of a Coin
- Use /coins/{id}/tickers endpoint
4. Get Trading Pairs of Specific Coins from a Specific Exchange
- Use /coins/{id}/tickers endpoint by supplying specific exchange id
5. Building Telegram Bot for Latest Coin Listings
- Use /coins/list/new endpoint
6. Get List of Coins Under Specific Category
- Use /coins/markets by supplying specific category
7. Identify DEX Decentralized Exchanges
-
Use /exchanges/list endpoint to get full list of exchanges with id on CoinGecko
-
Use /exchanges/{id} to find out whether the exchange is centralized or decentralized
-
Example of responses (using Uniswap V3 as example) :
Since Uniswap is a DEX, therefore it shows
"centralized": false
{ "name": "Uniswap V3 (Ethereum)", ...... "centralized": false, π ...... "tickers": [], "status_updates": [] }
8. Get Bitcoin Dominance Data (BTC.D)
-
Use /global endpoint
-
Example of responses:
{ "data": { "active_cryptocurrencies": 12414, ...... "market_cap_percentage": { π "btc": 47.82057011844006,π "eth": 16.943340351591583, ...... }, "market_cap_change_percentage_24h_usd": -5.032104325648996, "updated_at": 1706002730 } }
9. Get Market Cap or Dominance of a Specific Ecosystem
- Use /coins/categories
- The endpoint also returns the 24-hour percentage change, offering insights into the traction of different categories or ecosystems
10. Get Token Lists of a Specific Blockchain Network
- Use /token_lists/{asset_platforms_id}/all.json endpoint
- Supply asset platform id to the endpoint
11. Get 7-Day Sparkline Price Data of a Coin
- Use /coins/{id} or /coins/markets endpoints by flagging
sparkline = true
12. Get Link to Individual CoinGecko Coin Page
- Use /coins/list endpoint to get the API ID of the coin
- Supply API ID in this URL path format:
www.coingecko.com/en/coins/{API_ID}
- If you wish to the obtain the URL slug of a specific CoinGecko Coin Page, e.g.
www.coingecko.com/en/coins/{web_slug}
you may use /coin/{id} endpoint and obtain the web_slug value.
13. Check Coin Status and Stale Price Updates
- Active: use /coins/list endpoint, only active coins will be shown by default. You may also flag status=inactive to get list of inactive coins.
- Price Stale: use /simple/price endpoint, flag
include_last_updated_at = true
to check latest update time
14. Get Real-Time and Historical Exchange of BTC in USD
- Current exchange rate: use /exchange_rates endpoint
- Historical exchange rate: use /coins/{id}/history or /coins/{id}/market_chart endpoints
15. Get Watchlist Portfolio Data of a Coin
-
Use /coins/{id} endpoint by supplying coin id
-
Example of responses:
{ "id": "bitcoin", ...... "watchlist_portfolio_users": 1487932, π "market_cap_rank": 1, ...... }
16. Get Historical Data for Inactive Coins
Note: this is available for paid plan subscribers only.
- Use /coins/list endpoint, specifying the status param as
inactive
- Example of endpoint request:
https://pro-api.coingecko.com/api/v3/coins/list?include_platform=false&status=inactive&x_cg_pro_api_key=YOUR_API_KEY
- Retrieve the coin's ID from the endpoint mentioned above and use it to access historical data via the following endpoints
17. Get TVL (Total Value Locked) data of a Coin
- Use /coins/{id} endpoint by supplying coin id
- Example of responses:
"total_value_locked":
{
"btc": 72324,
"usd": 4591842314
}
18. Query Search for Coins, Categories, NFTs, Exchanges, and Pools
We have 2 Search endpoints:
- /search endpoint allows you to search for coins, categories, exchanges (markets), and NFTs listed on CoinGecko.com. You may query by name or symbol.
- /search-pools endpoint allows you to search for pools listed on GeckoTerminal.com. You may query by pool contract address, token contract address, or token symbol.
19. Get List of Blockchain Networks supported on CoinGecko and GeckoTerminal.
CoinGecko and GeckoTerminal support different sets of blockchain networks. You can use the following endpoints to find the list of supported networks and their respective IDs
- CoinGecko: /asset-platform-list
- GeckoTerminal (Onchain endpoints): /networks-list
20. Get Native Coin of a Blockchain Network (Asset Platform)
You may use the /asset-platform-list endpoint to obtain the native coin id of all networks (asset platforms) listed on www.coingecko.com.
Updated 30 days ago