# Historical Bitcoin data plan: non-commercial launch

## Sources

| Data | Source | Use |
| --- | --- | --- |
| BTC/USD daily history | Coin Metrics Community API | Daily Bitcoin reference series |
| USD/EUR and GBP/EUR daily rates | European Central Bank | Convert the USD BTC series into EUR and GBP |

This is appropriate only while Denominate remains non-commercial. Coin Metrics makes its Community API available for non-commercial use under a Creative Commons licence. The European Central Bank supplies the daily foreign-exchange reference series.

## How the series is calculated

Coin Metrics supplies `PriceUSD` for BTC. The ECB publishes currency values quoted against EUR:

```text
BTC/EUR = BTC/USD ÷ USD-per-EUR
BTC/GBP = BTC/EUR × GBP-per-EUR
```

ECB publishes only on working days. For weekends and ECB holidays, the exporter carries forward the most recent reference FX rate. The resulting chart must be labelled as a daily reference series, not an executable trading price.

## Generate the static file

No key is needed. From this project folder, run:

```bash
node scripts/export-free-history.mjs
```

It writes `data/btc-history-v1.json`, containing ten years of daily USD, EUR, and GBP prices plus source metadata. The exporter requests the complete daily range in a single Coin Metrics page, avoiding the API's default 100-row pagination. Deploy that file with the Cloudflare Pages site. It is not refreshed on every site visit.

## Attribution

Keep this attribution visible in the website footer or chart detail view:

```text
Historical BTC/USD data: Coin Metrics Community API. FX reference rates: European Central Bank.
```

## Commercial future

Before introducing ads, subscriptions, sponsorships, paid features, or other revenue, stop using this Community-data export and follow [commercial-launch/README.md](commercial-launch/README.md).
