| name | crypto-prices |
| description | Get real-time cryptocurrency prices, market data, and trending coins using the free CoinGecko API. |
Crypto Prices
Get real-time cryptocurrency prices, market data, and trending coins using the free CoinGecko API.
Category: finance
API Key Required: No
When to use
- User asks for the price of Bitcoin, Ethereum, or any cryptocurrency
- User wants market caps, 24h price changes, or trading volume
- User asks what's trending in crypto
- User wants price history or comparisons between coins
How it works
Base URL: https://api.coingecko.com/api/v3
1. Get current price of one or more coins
curl -s "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd,gbp&include_24hr_change=true&include_market_cap=true"
Coin IDs are lowercase (bitcoin, ethereum, solana, cardano, dogecoin, ripple). Use vs_currencies for fiat (usd, gbp, eur).
2. Get top coins by market cap
curl -s "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=10&page=1&sparkline=false"
Returns name, symbol, current price, market cap, 24h change, volume, etc.
3. Get trending coins (last 24h)
curl -s "https://api.coingecko.com/api/v3/search/trending"
4. Get coin details (description, links, stats)
curl -s "https://api.coingecko.com/api/v3/coins/bitcoin?localization=false&tickers=false&community_data=false&developer_data=false"
5. Search for a coin by name
curl -s "https://api.coingecko.com/api/v3/search?query=solana"
6. Price history (last N days)
curl -s "https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=7"
Examples
User: "What's the price of Bitcoin?"
→ Call simple/price for bitcoin in usd. Reply: "Bitcoin is currently $XX,XXX (up/down X.X% in 24h)."
User: "What are the top 5 cryptos right now?"
→ Call coins/markets with per_page=5. Format as a list with name, price, 24h change.
User: "What's trending in crypto?"
→ Call search/trending. List the top trending coins with their rank and symbol.
Constraints
- Rate limit: ~10-30 requests/minute on free tier
- Coin IDs must be lowercase slugs (use /search to find them)
- Price data may be delayed by a few minutes
- Attribution: Data from CoinGecko