This Python script retrieves real-time Bitcoin blockchain information. It provides details such as Bitcoin price, market cap, transaction fees, mempool information, and mining details.
- Retrieves real-time information about Bitcoin blockchain.
- Plays a sound whenever a new block is mined (support for both Linux and Windows systems).
- Colorful, console-based UI for easy data interpretation.
- Refresh countdown with a progress bar.
- Python 3
- Requests
- Colorama
- TQDM
- Pygame (Linux)
- Winsound (Windows)
Clone the repository:
git clone https://github.com/haui-btc/bitcoin_ticker.git
Navigate into the directory:
cd bitcoin_ticker
pip install -r requirements.txt
OR
sudo apt install python3-requests python3-pygame python3-colorama python3-tqdm
Run the script:
python bitcoin_ticker.py
Open your .bashrc file in a text editor.
vim ~/.bashrc
Go to the end of the file and add the following line:
alias bitcoin='python /PATH/TO/YOUR/bitcoin_ticker.py'
Save the file and exit the editor.
In order for your current terminal to recognize the new alias, you need to source your .bashrc file with the following command:
source ~/.bashrc
Now you can start the bitcoin ticker by simply typing
bitcoin
The script provides real-time information about:
- Bitcoin Price
- Moscow Time (number of satoshis you can buy at the moment for 1 US Dollar)
- Marketcap
- 24 Hour Volume
- Latest block details (height, timestamp, hash, transaction count, size)
- Mempool Information (unconfirmed transactions, transaction difference from last reload, minimum fee)
- Transaction Fees (low priority, medium priority, high priority)
- Mining Information (difficulty progress, remaining blocks, estimated difficulty change, previous difficulty change)
- This script uses the APIs from mempool.space and coingecko.com.
- For playing a sound when a new block is mined, it requires Pygame on Linux and Winsound on Windows.
- The sound file to be played should be placed in the 'sound' directory with the name 'sound.mp3'.