Access Bitcoin chart data programmatically
Important: When adding a new chart to the platform, you MUST update this API documentation page. Add the new endpoint below following the same format as existing endpoints. Include:
The Bitcoin Charts API provides real-time and historical data for various Bitcoin indicators and models. All endpoints return JSON responses and support customizable parameters for timespan, interval, and data limits.
https://charts.bitcoin.com/api/v1
Currently, no authentication is required. All endpoints are publicly accessible.
No rate limits are currently enforced, but please use the API responsibly.
These parameters are available across all chart endpoints:
| Parameter | Type | Default | Description |
|---|---|---|---|
interval |
string | daily |
Data interval: hourly, daily, weekly |
timespan |
string | all |
Time range: 30d, 1y, 2y, 5y, all |
limit |
number | 5000 |
Maximum number of data points to return |
111-day MA vs 350-day MA × 2 - Historical market top predictor
curl "https://charts.bitcoin.com/api/v1/charts/pi-cycle-top?interval=daily×pan=1y&limit=365"
| Field | Description |
|---|---|
data.price |
Array of Bitcoin price data points |
data.ma111 |
Array of 111-day moving average values |
data.ma350x2 |
Array of 350-day MA × 2 values |
data.crosses |
Array of historical cross events (top signals) |
Color-banded logarithmic price zones showing market phases
curl "https://charts.bitcoin.com/api/v1/charts/rainbow?interval=daily×pan=2y"
| Field | Description |
|---|---|
data.price |
Bitcoin price data with timestamps |
data.bands |
Color band thresholds and current zone |
currentZone |
Current market phase (e.g., "Fire Sale", "HODL", "FOMO") |
PlanB's scarcity-based valuation model
curl "https://charts.bitcoin.com/api/v1/charts/stock-to-flow?interval=daily×pan=all"
| Field | Description |
|---|---|
data.price |
Actual Bitcoin price data |
data.s2fModel |
Stock-to-Flow model predicted values |
data.ratio |
Price to model ratio |
Fibonacci-based price levels using the 350-day moving average
curl "https://charts.bitcoin.com/api/v1/charts/golden-ratio?interval=daily×pan=5y"
| Field | Description |
|---|---|
data.price |
Bitcoin price data |
data.ma350 |
350-day moving average |
data.multipliers |
Fibonacci multipliers (1.6, 3.3, 5.0, 8.0, etc.) |
Price / 200-Day Moving Average ratio
curl "https://charts.bitcoin.com/api/v1/charts/mayer-multiple?interval=daily×pan=1y"
| Field | Description |
|---|---|
data.price |
Bitcoin price data |
data.ma200 |
200-day moving average |
data.multiple |
Mayer Multiple ratio values |
Compare Bitcoin price against US M2 money supply expansion with normalized comparison
curl "https://charts.bitcoin.com/api/v1/charts/m2?interval=daily×pan=5y"
| Field | Description |
|---|---|
data.combined |
Combined Bitcoin price and M2 data points (normalized to 100) |
data.btcPrice |
Bitcoin price historical data |
data.m2Supply |
M2 supply monthly data points |
current.btcPrice |
Most recent Bitcoin price |
current.m2Billions |
Most recent M2 supply value in billions USD |
normalization.baseDate |
The date at which both series are indexed to 100 |
The M2 data represents US M2 Money Stock from the Federal Reserve Economic Data (FRED). M2 includes cash, checking deposits, savings accounts, and money market securities. Data is sourced from FRED API (series ID: M2SL) and updated monthly. Both Bitcoin price and M2 are normalized to 100 at their earliest shared date for comparative analysis.
Compare S&P 500 Index performance with Bitcoin price, both normalized to 100 for easy comparison
curl "https://charts.bitcoin.com/api/v1/charts/sp500?interval=daily×pan=5y"
| Field | Description |
|---|---|
data.combined |
Combined Bitcoin and S&P 500 data points (both normalized to 100) |
data.btcPrice |
Bitcoin price historical data |
data.sp500Values |
S&P 500 index historical values |
current.btcPrice |
Most recent Bitcoin price |
current.sp500Value |
Most recent S&P 500 index value |
current.btcNormalized |
Bitcoin price normalized to 100 at base date |
current.sp500Normalized |
S&P 500 value normalized to 100 at base date |
normalization.baseDate |
The date at which both series are indexed to 100 |
The S&P 500 data represents the S&P 500 stock market index from the Federal Reserve Economic Data (FRED). The S&P 500 tracks the performance of 500 of the largest US companies and is widely considered the best gauge of large-cap U.S. equities. Data is sourced from FRED API (series ID: SP500) and updated daily (every business day). Both Bitcoin price and S&P 500 are normalized to 100 at their earliest shared date for comparative analysis.
Track Bitcoin price alongside key macroeconomic indicators: Unemployment Rate (UNRATE) and 10-Year Treasury Yield (DGS10)
curl "https://charts.bitcoin.com/api/v1/charts/macro-mood?interval=daily×pan=5y"
| Field | Description |
|---|---|
data.btcPrice |
Bitcoin price historical data array (timestamp, price) |
data.unrate |
Unemployment Rate (UNRATE) data array (timestamp, value in %) |
data.dgs10 |
10-Year Treasury Yield (DGS10) data array (timestamp, value in %) |
metrics.btcPrice |
Most recent Bitcoin price (USD) |
metrics.btcYoY |
Bitcoin year-over-year change (%) |
metrics.unrate |
Current unemployment rate (%) |
metrics.unrateChange |
Unemployment rate year-over-year change (percentage points) |
metrics.dgs10 |
Current 10-year treasury yield (%) |
metrics.dgs10Change |
10-year yield year-over-year change (percentage points) |
dataInfo.earliestDate |
Earliest date with data for all three series |
dataInfo.latestDate |
Most recent date with data |
This chart combines three critical indicators to show how macroeconomic conditions affect Bitcoin:
Key Insight: Bitcoin tends to crash when BOTH unemployment spikes AND yields jump, creating a "risk-off" environment. Historical examples include the COVID shock (March 2020: UNRATE hit 14.8%) and Fed tightening cycle (Oct 2022: DGS10 peaked at 4.2%). The data is updated monthly for UNRATE and daily for DGS10, sourced from Federal Reserve Economic Data (FRED).
Calculate Dollar Cost Averaging strategies with historical Bitcoin price data. This endpoint accepts POST requests to simulate DCA investment strategies.
| Parameter | Type | Required | Description |
|---|---|---|---|
amount |
number | Yes | USD amount to invest per purchase (e.g., 100) |
frequency |
string | Yes | Purchase frequency: "daily", "weekly", "bi-weekly", or "monthly" |
duration |
number | Yes | Duration in years (e.g., 2 for 2 years) |
startDate |
string | Yes | Start date in YYYY-MM-DD format (e.g., "2022-01-01") |
curl -X POST "https://charts.bitcoin.com/api/v1/charts/dca/calculate" \
-H "Content-Type: application/json" \
-d '{
"amount": 100,
"frequency": "weekly",
"duration": 2,
"startDate": "2022-01-01"
}'
| Field | Description |
|---|---|
data.purchases |
Array of purchase events with timestamp, price, BTC purchased, and running totals |
data.priceData |
Historical Bitcoin price data for the specified date range |
metrics.totalInvested |
Total USD invested across all purchases |
metrics.totalValue |
Current value of all BTC purchased (at latest price) |
metrics.totalBTC |
Total Bitcoin accumulated |
metrics.percentageChange |
Percentage gain or loss on investment |
metrics.numberOfPurchases |
Total number of purchases made |
metrics.averagePrice |
Average price per BTC across all purchases |
Dollar Cost Averaging (DCA) is an investment strategy where you invest a fixed amount at regular intervals, regardless of the asset price. This calculator simulates historical DCA strategies using actual Bitcoin price data, allowing you to compare different investment approaches. The calculator automatically handles date ranges and calculates accumulation, average cost, and returns based on your specified parameters.
All errors follow a consistent format:
{
"success": false,
"error": "Error message description",
"code": "ERROR_CODE"
}
| Code | Status | Description |
|---|---|---|
INVALID_PARAMETER |
400 | Invalid parameter value provided |
NOT_FOUND |
404 | Endpoint or resource not found |
SERVER_ERROR |
500 | Internal server error |