GithubHelp home page GithubHelp logo

zaczero / cbbi Goto Github PK

View Code? Open in Web Editor NEW
130.0 10.0 45.0 11.3 MB

๐Ÿ“Š The official Python implementation of the ColinTalksCrypto Bitcoin Bull Run Index (CBBI)

Home Page: https://cbbi.info

License: GNU Affero General Public License v3.0

Python 93.30% Nix 6.70%
bitcoin confidence-score cryptocurrency docker python price-evaluation poetry

cbbi's Introduction

ColinTalksCrypto Bitcoin Bull Run Index (CBBI)

Python version Project license GitHub Repo stars

The official Python implementation of the ColinTalksCrypto Bitcoin Bull Run Index (CBBI).

The CBBI is a Bitcoin index that utilizes advanced, real-time analysis of 9 metrics to help us understand what stage of the Bitcoin bull run and bear market cycles we are in. The CBBI is time-independent and price-independent. It simply indicates whether it believes we are approaching the top/bottom of a Bitcoin cycle.

If you want to learn more, check out this video.

Visit our website

Bookmark it and receive latest CBBI updates.

Script Demo

asciicast

Docker Usage

To use the CBBI script with Docker, run the following command:

docker run --rm --pull=always zaczero/cbbi --help
docker run --rm --pull=always zaczero/cbbi

Manual Usage

To use the CBBI script without Docker, follow these two simple steps:

1. Install nix

Before you jump in, make sure to install the โ„๏ธ Nix package manager. It's your shortcut to seamless dependency management and reproducible environment setup. It will save you lots of time and spare you from unnecessary stress.

2. Run the application

nix-shell --run "python main.py --help"

or with using interactive shell

nix-shell
python main.py --help

Metrics

The current CBBI version (November 2022) includes the following metrics:

Name Link
Pi Cycle Top Indicator Visit page
RUPL/NUPL Chart Visit page
RHODL Ratio Visit page
Puell Multiple Visit page
2 Year Moving Average Visit page
Bitcoin Trolololo Trend Line Visit page
MVRV Z-Score Visit page
Reserve Risk Visit page
Woobull Top Cap vs CVDD Visit page

Environment Variables

This project supports .env files, which provide a convenient way of setting environment variables.

To use this feature, create a file called .env in the project's root directory, and add environment variables in the following format:

VARIABLE_NAME=value

GLASSNODE_API_KEY

Defines an API key to be used during GlassNode fallback requests. If unset or empty, a cache fallback will be used instead (via CBBI.info).

Example usage

  • GLASSNODE_API_KEY=REPLACE_ME

TELEGRAM_TOKEN, TELEGRAM_CHAT_ID

Define both variables to receive Telegram notifications about metric errors that occur during the execution.

Example usage

  • TELEGRAM_TOKEN=REPLACE_ME
  • TELEGRAM_CHAT_ID=123456

Footer

Contact me

https://monicz.dev/#get-in-touch

License

This project is licensed under the GNU Affero General Public License v3.0.

The complete license text can be accessed in the repository at LICENSE.

cbbi's People

Contributors

zaczero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cbbi's Issues

At what time is the API getting updated?

Hello,

Great work with this project. Around what time is the API getting updated? For a trading bot I'm trying to use the metrics from the API. I pull the data around 00:05 CET and it is giving nans for the new day.
Thanks in advance.

Missing requirements.txt

I noticed the readme says to pip install -r requirements.txt, but there is no requirements.txt. Instead, I believe it is pipenv now.

RHOLD and RR not calibrated.

Due to alpha decay these two indicators suffered the most and seem inconsistent. Is it possible a small calibration?

An Error Occured!

Hi Kamil,

Is this a LIB issue? Last week the script was running with no hiccups. I have just tried to run main.py and it keeps retrying but returning always these lines.

:: Retrying in 10 seconds...
Fetching daily Google Trends: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 57/57 [00:00<00:00, 211.09it/s]
Error: An error occurred!
Traceback (most recent call last):
File "D:\OneDrive\Work (Current)\ValueUnbanking\CBBI-main\main.py", line 146, in run_and_retry
run(json_file, charts_file)
File "D:\OneDrive\Work (Current)\ValueUnbanking\CBBI-main\main.py", line 78, in run
df_bitcoin[metric.name] = metric.calculate(df_bitcoin_org.copy(), ax)
File "D:\OneDrive\Work (Current)\ValueUnbanking\CBBI-main\metrics\rhodl_ratio.py", line 60, in calculate
df = df.merge(_fetch_df(), on='Date', how='left')
File "D:\OneDrive\Work (Current)\ValueUnbanking\CBBI-main\metrics\rhodl_ratio.py", line 36, in _fetch_df
response.raise_for_status()
File "C:\Python39\lib\site-packages\requests\models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://www.lookintobitcoin.com/django_plotly_dash/app/rhodl_ratio/_dash-update-component

Calculation method changed?

First of all, thanks for creating this index. I've been following it for a while and check it daily. Yesterday I saw the CBBI score was 9, but when I checked it today it's suddenly at 14? Also all the historic values have changed, so I wonder what was changed in the algorithm and why?

Other indicators

Hi Kamil!

Thank you so much for this amazing project. I was wondering whether you are planning to include all other indicators from lookintobitcoi.com.

Keep up the amazing work! :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.