Open source

Open source: the code behind Bitcoin Logbook

The website, the Bitcoin DCA calculator, its daily price file and its tests are all public on GitHub. Every calculation and every trade can be checked.

01

The two repositories

RepositoryWhat it is
johnnynanjiang/Bitcoin-LogbookThe full source of bitcoinlogbook.com: the Bitcoin DCA calculator (formulas, strategies and tests), the daily BTC/USD price file since 18 July 2010 and the script that updates it, the blog articles with their downloadable data, and the 18-trade journal.
johnnynanjiang/best-bitcoin-dca-calculatorsBest Bitcoin DCA Calculators 2026: a side-by-side comparison of 12 Bitcoin DCA calculators (price history, end dates, fees, lump-sum comparison, CSV export).
02

How to run the code

There is no build step. The site is plain HTML, CSS and JavaScript. No Node.js, npm or bundler is needed to use or deploy it. Clone the repository and open any index.html in a browser. The calculator even works straight from disk (file://).

git clone https://github.com/johnnynanjiang/Bitcoin-Logbook.git
cd Bitcoin-Logbook

# Run the calculator's tests (Node.js, no packages to install)
node apps/bitcoin-dca-calculator/tests/run.js

# Or open the same tests in a browser
open apps/bitcoin-dca-calculator/tests/index.html

# Add the latest daily prices (Python 3, no packages to install)
python3 .github/scripts/update_btc_prices.py

The calculator's formulas are in lib/core.js, with one folder per strategy in strategies/.

03

Where the data comes from

04

Licences

  • Code: MIT. Reuse it, change it, ship it.
  • Price data: Coin Metrics, CC BY-NC 4.0. Free to reuse with credit, for non-commercial purposes.
  • Articles, the trade journal and images: © Bitcoin Logbook, all rights reserved. Quoting with a link is welcome.
  • The comparison list: CC0.
05

Why open source?

"Don't trust, verify".

You shouldn't have to take my word for it. Every number on this site, from a calculator result to the reported +$4,629.81 profit, comes from code and data you can read, run and check yourself.

If a formula is wrong, you can see it. If a price is wrong, you can trace it to the source. If you find a problem, open an issue.

View the code on GitHub