> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coingecko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Compliance & Reporting

> Build tax reporting, fund accounting, and audit pipelines with timestamped historical prices from CoinGecko API

> [card] [Set up your API key](https://docs.coingecko.com/docs/setting-up-your-api-key.md)

> [card] [Build faster with AI](https://docs.coingecko.com/ai-integration.md#coding-agents)

> [!NOTE]
>
> **TL;DR**\\
>
> Use [/coins/\{id}/history](https://docs.coingecko.com/reference/coins-id-history.md) for point-in-time tax event prices, [/coins/\{id}/market\_chart/range](https://docs.coingecko.com/reference/coins-id-market-chart-range.md) for historical time series, [/coins/\{id}/ohlc/range](https://docs.coingecko.com/reference/coins-id-ohlc-range.md) for OHLC benchmarks, and [/simple/price](https://docs.coingecko.com/reference/simple-price.md) with `include_last_updated_at` for timestamped NAV snapshots.

> Replace `YOUR_API_KEY` in the examples below with your actual key. [Get one here →](https://www.coingecko.com/en/api/pricing)

## Pipeline Setup

**1. Map assets — /coins/list**

Build a lookup table mapping your internal identifiers to CoinGecko coin IDs and contract addresses.

> [tab] Pro API
>
> ```bash theme={null}
> 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 →](https://docs.coingecko.com/reference/coins-list.md)

> [tab] Demo API
>
> ```bash theme={null}
> curl -X GET \
>   "https://api.coingecko.com/api/v3/coins/list?include_platform=true" \
>   -H "x-cg-demo-api-key: YOUR_API_KEY"
> ```
>
> > [Coins List →](https://docs.coingecko.com/demo/reference/coins-list.md)

| Key param | Use |
| - | - |
| `include_platform` | Include 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.

> [tab] Pro API
>
> ```bash theme={null}
> 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 →](https://docs.coingecko.com/reference/simple-supported-currencies.md)

> [tab] Demo API
>
> ```bash theme={null}
> curl -X GET \
>   "https://api.coingecko.com/api/v3/simple/supported_vs_currencies" \
>   -H "x-cg-demo-api-key: YOUR_API_KEY"
> ```
>
> > [Supported Currencies →](https://docs.coingecko.com/demo/reference/simple-supported-currencies.md)

> [!TIP]
>
> 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.

> [tab] Pro API
>
> ```bash theme={null}
> 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 →](https://docs.coingecko.com/reference/coins-id-history.md)

> [tab] Demo API
>
> ```bash theme={null}
> curl -X GET \
>   "https://api.coingecko.com/api/v3/coins/bitcoin/history?date=15-04-2024&localization=false" \
>   -H "x-cg-demo-api-key: YOUR_API_KEY"
> ```
>
> > [Coin Historical Data →](https://docs.coingecko.com/demo/reference/coins-id-history.md)

Prices are returned in all supported fiat currencies simultaneously — no separate calls needed for multi-jurisdiction reports.

> [!NOTE]
>
> 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.

> [tab] Pro API
>
> ```bash theme={null}
> 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 →](https://docs.coingecko.com/reference/coins-id-market-chart-range.md)

> [tab] Demo API
>
> ```bash theme={null}
> curl -X GET \
>   "https://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-demo-api-key: YOUR_API_KEY"
> ```
>
> > [Market Chart Range →](https://docs.coingecko.com/demo/reference/coins-id-market-chart-range.md)

| Key param | Use |
| - | - |
| `from` / `to` | ISO dates or UNIX timestamps |
| `interval` | `daily` or `hourly` for consistent data points, or omit for auto |

> [!TIP]
>
> For tokens tracked by contract address, use [Contract Market Chart Range](https://docs.coingecko.com/reference/contract-address-market-chart-range.md) — 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.

> [tab] Pro API
>
> ```bash theme={null}
> 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 →](https://docs.coingecko.com/reference/coins-id-ohlc-range.md)

> [tab] Demo API
>
> `/coins/{id}/ohlc/range` is not available on the Demo API.\\
>
> [Upgrade to Pro →](https://www.coingecko.com/en/api/pricing)

Response format: `[timestamp, open, high, low, close]` — consistent five-element arrays.

> [!TIP]
>
> For simpler lookbacks without custom date ranges, use [/coins/\{id}/ohlc](https://docs.coingecko.com/reference/coins-id-ohlc.md) 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.

> [tab] Pro API
>
> ```bash theme={null}
> 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 →](https://docs.coingecko.com/reference/simple-price.md)

> [tab] Demo API
>
> ```bash theme={null}
> curl -X GET \
>   "https://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-demo-api-key: YOUR_API_KEY"
> ```
>
> > [Simple Price →](https://docs.coingecko.com/demo/reference/simple-price.md)

```json theme={null}
{
  "bitcoin": {
    "usd": 67432.51,
    "eur": 63521.12,
    "usd_market_cap": 1326789012345,
    "last_updated_at": 1712345678
  }
}
```

| Key param | Use |
| - | - |
| `include_last_updated_at` | UNIX timestamp — critical for audit trails |
| `include_market_cap` | AUM and exposure reporting |
| `precision` | Consistent decimal formatting |

Schedule this call daily for end-of-day NAV records.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.