Skip to main content

Track Bitcoin price over halving cycles

Project description

btc-cycles

Bitcoin price analysis across halving cycles.

PyPI Python Tests Update chart Codecov 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(
    source="cryptocompare",
    api_key="YOUR_API_KEY",
)

# 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

pip install btc-cycles

Data Sources

Source API Key Status
cryptocompare Free tier Default
coinmarketcap Paid Not implemented
coinmarketcap-free None Broken (ref)

Documentation

See the notebook for a full working example.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

btc_cycles-0.4.1.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

btc_cycles-0.4.1-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file btc_cycles-0.4.1.tar.gz.

File metadata

  • Download URL: btc_cycles-0.4.1.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for btc_cycles-0.4.1.tar.gz
Algorithm Hash digest
SHA256 0620ea3dceafd2b34543c2012e852d3fac8860896134f04fb9a1ca9bd9af3e00
MD5 b5a89bad374f5ec89372a9fbb2abd51a
BLAKE2b-256 d5acf75e54d542d99221b6a440b12adc122b08c3eb9ec32426d70a4208efe476

See more details on using hashes here.

Provenance

The following attestation bundles were made for btc_cycles-0.4.1.tar.gz:

Publisher: python-publish.yml on giocaizzi/btc-cycles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file btc_cycles-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: btc_cycles-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for btc_cycles-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea33e363eb6d2557739fe60727b204b0fa506200eedbc41450dde60785a57e77
MD5 aee4ae487edd593ba2262ff037f09248
BLAKE2b-256 896737ffd6ec8f9f238e18066326b800eee566271f3d86709e0ad85b3707a91d

See more details on using hashes here.

Provenance

The following attestation bundles were made for btc_cycles-0.4.1-py3-none-any.whl:

Publisher: python-publish.yml on giocaizzi/btc-cycles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page