This is a simple Python script that generates a liquidation chart for Bitcoin using the style of Coinglass. The total liquidation chart provides an overview of the short and long liquidations as well as the corresponding BTC price on that day. The settings can be adjusted to also use other cryptocurrencies listed on Binance. The resulting plot can be used as an indicator to determine when to buy or sell Bitcoin. The chart is generated using the matplotlib library in Python.
I have previously recreated this chart for my fintwit-bot, unfortunately coinglass removed their API so I had to recreate it using other sources. I used the chart found on Coinglass as a reference. The data is fetched using Binance Public Data and new data is added which each run.
The required packages to run this code can be found in the requirements.txt file. To run this file, execute the following code block after cloning the repository:
pip install -r requirements.txt
To generate the chart, simply run the script using the following command:
python src/main.py
The following chart is an example of the output generated by the script. The chart shows the total liquidations for Bitcoin over the past 180 days.
The following image was used as a reference to create the liquidation chart.
This project is part of a series of projects that I have created. You can find the other projects in the following list: