AI / API
Open API for people and AI agents
Free read-only JSON endpoints over the same data the site shows. No key, open CORS, 60 requests per minute per IP. Every response names its source and as-of time.
Share this page
Endpoints
| GET /api/v1 | JSON index of the API: all resources, update frequency, sources, links to /mcp and this page |
| GET /api/v1/index | Same document as /api/v1 (original address) |
| GET /api/v1/price | Live BTC price in USD and 7 other currencies (official FX reference rates). |
| GET /api/v1/etf | US spot Bitcoin ETFs: BTC held, fee, latest/5d/20d/cumulative flows (USD millions). |
| GET /api/v1/risk | Risk On/Off composite score (0–100) with every input, formula and source. |
| GET /api/v1/volatility | Annualised realised volatility over 7/30/90/365 days and by year. |
| GET /api/v1/holders | Bitcoin holders: companies, funds, governments (BTC, 7-day change). |
| GET /api/v1/rainbow | Rainbow model fit parameters and today's deviation (a model, not a forecast). |
| GET /api/v1/stock-to-flow | Stock-to-flow ratio and PlanB 2019 model value (a model, not a forecast). |
curl https://21btc.cc/api/v1/etf
Headers X-RateLimit-Limit / Remaining / Reset; over the limit you get 429 with Retry-After. Responses are cached for 60 seconds.
Connect an AI agent
MCP clients can use the read-only server at /mcp (Streamable HTTP, the same data plus fees, derivatives, search and events). For other agents one HTTP tool is enough: describe it like this (function-calling format), or give the agent this page and /llms.txt.
{
"name": "btc_data",
"description": "Read Bitcoin market data from 21btc.cc (price, etf, risk, volatility, holders, rainbow, stock-to-flow)",
"input_schema": {
"type": "object",
"properties": {
"resource": {
"type": "string",
"enum": [
"price",
"etf",
"risk",
"volatility",
"holders",
"rainbow",
"stock-to-flow"
]
}
},
"required": [
"resource"
]
},
"http": {
"method": "GET",
"url": "https://21btc.cc/api/v1/{resource}"
}
}Terms
- Free, with attribution to 21btc.cc and the original sources named in each response.
- Data is aggregated from public sources and can lag; check the as_of fields.
- Not investment advice. Models (rainbow, stock-to-flow) are not forecasts.
- No uptime guarantee; the v1 format is stable, new fields may be added.
FAQ
- Do I need an API key?
- No. The limit is 60 requests per minute per IP address.
- Where does the data come from?
- Farside (ETF flows), bitcointreasuries.net (holders), alternative.me (Fear & Greed), bitcoin-data.com (on-chain), blockchain.info and exchanges (prices), ECB / Bank of Russia (FX). Each response names its source.