---
name: cryptokeyhole-data
description: Fetch Bitcoin, Ethereum and other coins' on-chain and market chart data from CryptoKeyhole (prices, valuation, holder, flow, mining, derivatives and network series) with the cryptokeyhole command or its API. Use when a task needs current or historical crypto chart values, a chart for every coin, or SQL over published series.
---

# CryptoKeyhole data

CryptoKeyhole publishes charts for Bitcoin, Ethereum and a growing list of coins, mostly calculated from its own nodes.
Every chart has an id such as `eth.PriceUSD`, `ckh.MVRVZScoreKnownBasisPriced` (Bitcoin) or `addresses.ActiveCount`
(Bitcoin). Values carry a finality: `final`, `provisional`, or `partial` for the open period. Report that word with any
value you quote, and never present a partial value as a closed one.

## Setup

```sh
pip install https://cryptokeyhole.com/data-access/sdk/cryptokeyhole-1.2.1-py3-none-any.whl   # the cryptokeyhole command
export CRYPTOKEYHOLE_API_KEY=...   # optional; without it: daily and longer values of the Free charts
```

The key is the user's (from their account page). Never print it, put it in a URL or write it to a file.

## Commands (CSV on standard output)

| Need | Command |
|---|---|
| The newest value | `cryptokeyhole latest eth.PriceUSD` |
| History | `cryptokeyhole values ckh.MVRVZScoreKnownBasisPriced --start 2024-01-01` |
| Exact values with provenance | `cryptokeyhole series eth.PriceUSD --interval 24h --start 2025-01-01` |
| Find chart ids for a coin | `cryptokeyhole metrics ETH` (id, name, unit, intervals, status, access) |
| One chart for every coin (Plus) | `cryptokeyhole every-coin PriceUSD --start 2025-01-01` |
| SQL over every chart's daily values (Pro) | `cryptokeyhole sql "SELECT asset, metric, name FROM metrics WHERE name LIKE '%realized%' AND component IS NULL LIMIT 20"` |
| Nightly files (Pro) | `cryptokeyhole files`, then `cryptokeyhole download <name>` |

Intervals: `24h`, `1w`, `1M` (a month), `1Y` for everyone; `1h` with Plus; `10m` and `1m` (a minute: the BTC, ETH and
LINK market charts that list it) with Pro. SQL tables: `series` (asset, metric,
chart, component, interval, day, t, value, finality), `latest`, `metrics`, `assets`; `cryptokeyhole sql "SELECT ..."`
answers one read-only statement.

Without the command, the same data is plain HTTP: `curl "https://cryptokeyhole.com/api/v1/series?metric=eth.PriceUSD&interval=24h"`
(add `-H "Authorization: Bearer $CRYPTOKEYHOLE_API_KEY"` for a plan). Assistants that speak MCP can use the server at
https://cryptokeyhole.com/mcp/ instead.

## Answers

- A message that names a plan (Plus, Pro, API & Team) means the chart or feature is not in the user's plan: say so; do
  not guess the value.
- Quote the time of each value (UTC) and its finality; daily values close at 00:00 UTC.
- Free charts are CC BY 4.0: credit "CryptoKeyhole" with a link to https://cryptokeyhole.com when you publish them.
- Each chart's page explains what it measures and how: `https://cryptokeyhole.com/charts/<coin>/?metric=<id>`.

Guide: https://cryptokeyhole.com/data-access/
