How to hit the CoinGecko API

CoinGecko's public API at https://api.coingecko.com/api/v3 covers prices, market data, and history for thousands of coins. Coins are addressed by id (bitcoin, ethereum), not ticker. Every example below runs as-is.

Authentication

None for the public API, which is tightly rate-limited. A free Demo key raises the limit — send it as the x-cg-demo-api-key header.

Full reference: https://docs.coingecko.com/reference/introduction

Current price

Several coins in several currencies in one call.

curl "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd,eur"
Run in PostTaco
Example response (trimmed)
{
  "bitcoin": {
    "usd": 84307,
    "eur": 74052
  },
  "ethereum": {
    "usd": 2671.63,
    "eur": 2346.65
  }
}

Top coins by market cap

Price, market cap, rank, and 24-hour change — the data behind a leaderboard.

curl "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=3&page=1"
Run in PostTaco
Example response (trimmed)
[
  {
    "id": "bitcoin",
    "symbol": "btc",
    "name": "Bitcoin",
    "current_price": 84308,
    "market_cap": 1694224192739,
    "market_cap_rank": 1,
    "price_change_percentage_24h": -2.30894,
    "last_updated": "2026-09-23T20:31:30.000Z"
  },
  {
    "id": "ethereum",
    "symbol": "eth",
    "name": "Ethereum",
    "current_price": 2671.63,
    "market_cap": 326225221059,
    "market_cap_rank": 2,
    "price_change_percentage_24h": -3.03463,
    "last_updated": "2026-09-23T20:31:30.000Z"
  }
]

Price history

Price, market cap, and volume over time as [unix ms, value] pairs.

curl "https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=1&interval=daily"
Run in PostTaco
Example response (trimmed)
{
  "prices": [
    [
      1790121600000,
      86183.29442787907
    ],
    [
      1790195560000,
      84307.46416891081
    ]
  ],
  "market_caps": [
    [
      1790121600000,
      1731252948699.2454
    ],
    [
      1790195560000,
      1693622513582.9373
    ]
  ],
  "total_volumes": [
    [
      1790121600000,
      43496653159.936775
    ],
    [
      1790195560000,
      44429988336.84008
    ]
  ]
}