Lodol Docs

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

ParameterTypeRequiredDescription
coin_idstringYesCoin ID (e.g., 'bitcoin').
vs_currencystringYesTarget currency (e.g., 'usd').
daysnumberYesNumber of days of historical data (1, 7, 14, 30, 90, 180, 365, max).
intervalstringNoData 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

ParameterTypeRequiredDescription
coin_idsstringYesComma-separated list of coin IDs (e.g., 'bitcoin,ethereum').
vs_currenciesstringYesComma-separated list of target currencies (e.g., 'usd,eur').
include_market_capbooleanNoInclude market cap data in response.
include_24hr_volbooleanNoInclude 24-hour volume data in response.
include_24hr_changebooleanNoInclude 24-hour price change data in response.

Response

{
  "bitcoin": {
    "eur": 38900.25,
    "usd": 42150.5
  },
  "ethereum": {
    "eur": 2075.5,
    "usd": 2250.75
  }
}

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"
      }
    }
  ]
}

On this page