chaindl

Download crypto on-chain data with a single line of code.

https://github.com/dhruvan2006/chaindl/actions/workflows/release.yml/badge.svg https://github.com/dhruvan2006/chaindl/actions/workflows/tests.yml/badge.svg https://img.shields.io/pypi/v/chaindl https://static.pepy.tech/badge/ocfinance https://img.shields.io/github/license/dhruvan2006/chaindl

chaindl is a lightweight Python library that lets you fetch historical and live on-chain crypto data from multiple public sources in one step. Whether you want to analyze metrics from Bitcoin, Ethereum, or other chains, chaindl handles the heavy lifting so you can focus on insights.

It supports:

Installation

Install using pip:

pip install chaindl

You will need Python 3 to use this package.

Usage

To use chaindl, all you need is the direct URL of a metric or chart from a supported site.

import chaindl

df = chaindl.download(
    "https://charts.checkonchain.com/btconchain/unrealised/mvrv_all_zscore/mvrv_all_zscore_light.html",
)

This function returns a pandas.DataFrame with time series data.

Example output:

            1.5sd  1.0sd  -0.5sd  ...    Price 1.0sd  Price -0.5sd  Price -1.0sd
Date                              ...
2010-07-18    NaN    NaN     NaN  ...            NaN           NaN           NaN
2010-07-19    NaN    NaN     NaN  ...            NaN           NaN           NaN
2010-07-20    NaN    NaN     NaN  ...            NaN           NaN           NaN
2010-07-21    NaN    NaN     NaN  ...            NaN           NaN           NaN
2010-07-22    NaN    NaN     NaN  ...            NaN           NaN           NaN
...           ...    ...     ...  ...            ...           ...           ...
2025-08-16    0.0    0.0     0.0  ...  127515.763276  71066.069382  58482.837504
2025-08-17    0.0    0.0     0.0  ...  127558.310518  71091.341230  58504.062488
2025-08-18    0.0    0.0     0.0  ...  127616.938695  71125.767557  58532.873812
2025-08-19    0.0    0.0     0.0  ...  127713.177446  71181.632875  58579.459251
2025-08-20    0.0    0.0     0.0  ...  127717.341892  71186.181907  58583.814095

Supported Sources

chaindl supports URLs from the following public sources:

CheckOnChain (charts.checkonchain.com)

Example:

url = "https://charts.checkonchain.com/btconchain/unrealised/mvrv_all_zscore/mvrv_all_zscore_light.html"
df = chaindl.download(url)

ChainExposed (chainexposed.com)

Example:

url = "https://chainexposed.com/NUPL.html"
df = chaindl.download(url)

WooCharts (woocharts.com)

Example:

url = "https://woocharts.com/bitcoin-price-models/"
df = chaindl.download(url)

Bitbo Charts (charts.bitbo.io)

Example:

url = "https://charts.bitbo.io/long-term-power-law/"
df = chaindl.download(url)

Blockchain.com (blockchain.com)

Example:

url = "https://www.blockchain.com/explorer/charts/market-price"
df = chaindl.download(url)

Glassnode (studio.glassnode.com)

Only basic (T1) metrics are supported. You can find a list of the basic metrics on their website.

Example:

url = "https://studio.glassnode.com/charts/addresses.ActiveCount?a=BTC"
df = chaindl.download(url)

The Block (theblock.co/data)

Click ‘Share’ and ‘Copy Link’ to get the URL of the respective metric.

Example:

url = "https://www.theblock.co/data/crypto-markets/spot/total-exchange-volume-daily"
df = chaindl.download(url)

Dune (dune.com)

When on a Dune dashboard, you need to open the specific indicator/chart to access the queries page that shows the SQL and results. The URL should be in the format https://dune.com/queries/{query_id}/{result_id}.

_images/dune.png

Example:

url = "https://dune.com/queries/5583538/9204329"
df = chaindl.download(url)

Bitcoin Magazine Pro (bitcoinmagazinepro.com)

Example:

url = "https://www.bitcoinmagazinepro.com/charts/puell-multiple/"
df = chaindl.download(url)

Optional Arguments

You can filter the data by date using:

  • start (str): Starting date, format “YYYY-MM-DD”

  • end (str): Ending date, format “YYYY-MM-DD”

If no dates are provided, the full available history is returned.

Error Handling

If the URL is invalid or from an unsupported domain, an exception will be raised:

chaindl.download("https://unsupported-domain.com")
# Raises ValueError: Unsupported source

Contributing

We welcome contributions! To add support for a new data source:

  1. Create a new scraper module in chaindl/sources/

  2. Add a URL pattern matcher in chaindl/download.py

  3. Add tests and add documentation

  4. Submit a pull request

License

chaindl is released under the MIT License.