Skip to main content

btc-cycles

Bitcoin price analysis across halving cycles.

PyPI Python CI Update chart Coverage Ruff License: MIT


This chart is updated daily at 5:00 UTC.

Interactive chart | Static chart

Bitcoin


Fetch Bitcoin price data, enrich it with halving cycle metrics (ATH, cycle progress, cycle lows), and render a polar chart. Cycles are computed using past halving dates and the predicted next halving from watcher.guru.

from btc_cycles import Bitcoin

btc = Bitcoin()  # defaults to source="coinmarketcap-free", no API key needed

# static chart (matplotlib)
fig = btc.plot(from_date="2012-11-28")
fig.savefig("bitcoin.png")

# interactive chart (plotly)
fig = btc.plot(kind="interactive", from_date="2012-11-28")
fig.write_html("bitcoin.html")

Installation

Requires Python 3.11.5 or newer.

pip install btc-cycles

Data Sources

Source API Key Status
coinmarketcap-free (cryptoCMD) None Default, data from 2013-04-28
cryptocompare Paid (free tier discontinued) Supported
coinmarketcap Paid Not implemented

Documentation

See the notebook for a full working example. How the daily chart is built: docs/daily-chart.md.

License

MIT

Metadata

Release files for btc-cycles 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for btc-cycles 1.0.0
File Size Uploaded Provenance Actions
btc_cycles-1.0.0.tar.gz 1.6 MB With provenance Details for btc_cycles-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for btc-cycles 1.0.0
File Interpreter ABI Platform Actions
btc_cycles-1.0.0-py3-none-any.whl Python 3 none any Details for btc_cycles-1.0.0-py3-none-any.whl

Total release size: 1.6 MB

Release files / btc_cycles-1.0.0.tar.gz

Download URL btc_cycles-1.0.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
503f090992c59a5574ec15b8ebdacadec959845601f6b1eb661fe974c50b9655
BLAKE2b-256 checksum
How to use checksums
1fbda82a185c44f0971e9f03e24ad8861e8b623d4a563bb04e8aadd29b46e57d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / btc_cycles-1.0.0-py3-none-any.whl

Download URL btc_cycles-1.0.0-py3-none-any.whl
Size 23.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a14291700d0793e03379956a90c3683794f02591c878f46c4acaed3794ac99bb
BLAKE2b-256 checksum
How to use checksums
a0d034785156d66770318128a85280a876025831ad25a63f166446fa9082b1d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for btc-cycles 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for btc_cycles-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page