Description · Requirements · Motivation · Roadmap · Installation · Uninstall · Contribute
Bitcoin Dollar Cost Averaging Script
This script has been built using Shell Script and Python. The main goal is to automate the process of buying this asset on Binance through the cron service , which is typically a native service on Linux-based systems.
- Python 3.14.2 && python3.12-venv
- Linux environment
- Cron service
This script was built primarily to run on a Linux-based system alongside the cron service, such as a VPS, Raspberry Pi, or server, where it can run continuously.
- Simplicity
- Low resource consumption
- Ideal for VPSs and Raspberry Pi devices
- More flexibility and control over your orders and logs
Below are the upcoming planned features:
- Implement a Telegram bot: This bot will notify the user of the current operation status when the script runs.
- Update the API authentication method: Migrate from HMAC (current method) to Ed25519 , which provides a more secure communication mechanism.
It's possible to track this roadmap in the issues tab.
Before running setup.sh, ensure that the cron service is installed and enabled on your system.
sudo apt update -y && \
sudo apt install cron && \
sudo systemctl enable cron && \
sudo systemctl start cronsudo dnf update -y && \
sudo dnf install cronie -y && \
sudo systemctl enable crond && \
sudo systemctl start crondsudo pacman -Syu --noconfirm && \
sudo pacman -S cronie --noconfirm && \
sudo systemctl enable cronie && \
sudo systemctl start cronie1- Execution permission for setup.sh
chmod +x ./setup.sh2- Execute the setup shell script
sudo ./setup.shchmod +x ./uninstall.sh && sudo ./uninstall.sh
If you wish to contribute to this script, you're more than welcome.
Before you start it is mandatory that you understand how the project structure works.
Below are the main directories and files you must be familiar with:
/etc/cron.d/: Directory repsonsible for storing all schedules jobs./var/log/bitcoindca/: Directory responsible for storing execution logs of this script, including all operations and their statuses./etc/default/btcdca/: Directory responsible for storing the Binance API secrets.- The secret file is stored with
600permissions and is acessible only by the root user.
- The secret file is stored with
/usr/local/bin/dca_operation.py: File responsible executing the buy order itself.- It receives an argument (--amount or -A) passed from the cron configuration files located in
/etc/cron.d/
- It receives an argument (--amount or -A) passed from the cron configuration files located in