Skip to main content

Set up your API key

Build faster with AI

TL;DR
Use /coins/{id}/history for point-in-time tax event prices, /coins/{id}/market_chart/range for historical time series, /coins/{id}/ohlc/range for OHLC benchmarks, and /simple/price with include_last_updated_at for timestamped NAV snapshots.
Replace YOUR_API_KEY in the examples below with your actual key. Get one here →

Pipeline Setup

1

Map assets — /coins/list

Build a lookup table mapping your internal identifiers to CoinGecko coin IDs and contract addresses.
curl -X GET \
  "https://pro-api.coingecko.com/api/v3/coins/list?include_platform=true" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Coins List →
Key paramUse
include_platformInclude contract addresses per platform — essential for reconciling tokens by address
2

Validate currencies — /simple/supported_vs_currencies

Confirm your reporting currencies are supported before building queries.
curl -X GET \
  "https://pro-api.coingecko.com/api/v3/simple/supported_vs_currencies" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Supported Currencies →
Cache this list at pipeline startup. Unsupported currencies return empty results without an error.

Historical Data

1

Tax event prices — /coins/{id}/history

Fair market value at a specific date — the core endpoint for tax reporting and trade reconciliation.
curl -X GET \
  "https://pro-api.coingecko.com/api/v3/coins/bitcoin/history?date=15-04-2024&localization=false" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Coin Historical Data →
Prices are returned in all supported fiat currencies simultaneously — no separate calls needed for multi-jurisdiction reports.
The date parameter uses dd-mm-yyyy format (not ISO). Data is a snapshot at 00:00:00 UTC.
2

Historical time series — /coins/{id}/market_chart/range

Price, market cap, and volume as [timestamp, value] arrays for a custom date range — maps directly to database columns.
curl -X GET \
  "https://pro-api.coingecko.com/api/v3/coins/bitcoin/market_chart/range?vs_currency=usd&from=2024-01-01&to=2024-12-31&interval=daily" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Market Chart Range →
Key paramUse
from / toISO dates or UNIX timestamps
intervaldaily or hourly for consistent data points (paid plans), or omit for auto
For tokens tracked by contract address, use Contract Market Chart Range — same schema, queried by address instead of coin ID.
3

OHLC benchmarks — /coins/{id}/ohlc/range

Daily or hourly OHLC candles for a custom date range — use closing price as end-of-day valuation, or open/close spread for volatility reporting.
curl -X GET \
  "https://pro-api.coingecko.com/api/v3/coins/ethereum/ohlc/range?vs_currency=usd&from=2024-01-01&to=2024-03-31&interval=daily" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
OHLC Range →
Response format: [timestamp, open, high, low, close] — consistent five-element arrays.
For simpler lookbacks without custom date ranges, use /coins/{id}/ohlc with a days parameter.

Daily Snapshots

1

Timestamped NAV — /simple/price

Current prices with last_updated_at — the audit timestamp confirming when CoinGecko last updated the price.
curl -X GET \
  "https://pro-api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,solana&vs_currencies=usd,eur&include_market_cap=true&include_last_updated_at=true" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Simple Price →
{
  "bitcoin": {
    "usd": 67432.51,
    "eur": 63521.12,
    "usd_market_cap": 1326789012345,
    "last_updated_at": 1712345678
  }
}
Key paramUse
include_last_updated_atUNIX timestamp — critical for audit trails
include_market_capAUM and exposure reporting
precisionConsistent decimal formatting
Schedule this call daily for end-of-day NAV records.