CoinGecko
API actions for the CoinGecko integration.
CoinGecko
Access public cryptocurrency prices and market data from CoinGecko.
Get global data
Retrieve global cryptocurrency market statistics.
Response
{
"data": {
"active_cryptocurrencies": 14500,
"market_cap_percentage": {
"btc": 48.5,
"eth": 17.2
},
"markets": 950,
"total_market_cap": {
"usd": 1750000000000
}
}
}Get market chart
Retrieve historical market data (price, market cap, volume) for a coin.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
coin_id | string | Yes | Coin ID (e.g., 'bitcoin'). |
vs_currency | string | Yes | Target currency (e.g., 'usd'). |
days | number | Yes | Number of days of historical data (1, 7, 14, 30, 90, 180, 365, max). |
interval | string | No | Data interval (e.g., 'daily'). Leave empty for automatic granularity. |
Response
{
"market_caps": [
[
1706097600000,
825000000000
],
[
1706184000000,
828000000000
]
],
"prices": [
[
1706097600000,
42150.5
],
[
1706184000000,
42300.75
]
],
"total_volumes": [
[
1706097600000,
15000000000
],
[
1706184000000,
16000000000
]
]
}Get simple price
Fetch current prices for one or more cryptocurrencies in specified currencies.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
coin_ids | string | Yes | Comma-separated list of coin IDs (e.g., 'bitcoin,ethereum'). |
vs_currencies | string | Yes | Comma-separated list of target currencies (e.g., 'usd,eur'). |
include_market_cap | boolean | No | Include market cap data in response. |
include_24hr_vol | boolean | No | Include 24-hour volume data in response. |
include_24hr_change | boolean | No | Include 24-hour price change data in response. |
Response
{
"bitcoin": {
"eur": 38900.25,
"usd": 42150.5
},
"ethereum": {
"eur": 2075.5,
"usd": 2250.75
}
}Get trending coins
Fetch the top trending coins based on search popularity.
Response
{
"coins": [
{
"item": {
"coin_id": 1,
"id": "bitcoin",
"market_cap_rank": 1,
"name": "Bitcoin",
"symbol": "BTC"
}
}
]
}