CoinGecko Endpoint
Fetch cryptocurrency token data from CoinGecko API
GET /api/coingecko/token
Retrieve detailed information about a cryptocurrency token including price, market cap, and trading volume.
Query Parameters
tokenId
CoinGecko token ID (e.g., "bitcoin", "ethereum")
Example Request
GET /api/coingecko/token?tokenId=bitcoin
fetch('/api/coingecko/token?tokenId=bitcoin')
.then(res => res.json())
.then(data => console.log(data))Response
200 OK
{
"success": true,
"data": {
"id": "bitcoin",
"symbol": "btc",
"name": "Bitcoin",
"current_price": 45000,
"market_cap": 880000000000,
"market_cap_rank": 1,
"total_volume": 25000000000,
"high_24h": 46000,
"low_24h": 44000,
"price_change_24h": 1000,
"price_change_percentage_24h": 2.27,
"ath": 69000,
"atl": 100
}
}