Lodol Docs

CoinGecko

API actions for the CoinGecko integration.

CoinGecko

Access public cryptocurrency prices and market data from CoinGecko.


Get global market 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_idstringYesThe coin to look up (for example, bitcoin).
vs_currencystringYesThe currency to show values in (for example, usd).
daysnumberYesNumber of days of historical data (1, 7, 14, 30, 90, 180, 365, max).
intervalstringNoHow often to include a data point (for example, daily). Leave empty to choose automatically.

Response

{
  "market_caps": [
    [
      1706097600000,
      825000000000
    ],
    [
      1706184000000,
      828000000000
    ]
  ],
  "prices": [
    [
      1706097600000,
      42150.5
    ],
    [
      1706184000000,
      42300.75
    ]
  ],
  "total_volumes": [
    [
      1706097600000,
      15000000000
    ],
    [
      1706184000000,
      16000000000
    ]
  ]
}

Get coin prices

Look up the current price of one or more cryptocurrencies in the currencies you choose.

Parameters

ParameterTypeRequiredDescription
coin_idsstringYesThe coins to look up, separated by commas (for example, bitcoin,ethereum).
vs_currenciesstringYesThe currencies to show prices in, separated by commas (for example, usd,eur).
include_market_capbooleanNoSet to true to also include each coin's market cap.
include_24hr_volbooleanNoSet to true to also include each coin's trading volume over the past 24 hours.
include_24hr_changebooleanNoSet to true to also include how much each coin's price changed over the past 24 hours.

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