Automated dollar cost averaging on the Kraken exchange
- β€ About the project
- β€ Configuration
- β€ Push Notifications
- β€ Run with Docker
- β€ Run without Docker
Since Kraken has extremely high fees for its crypto savings plan, this tool was developed to invest regularly in cryptocurrencies. Since Kraken offers two platforms: βKrakenβ and βKraken Proβ, we take advantage of the fact that Kraken Pro has very low fees. All you have to do is regularly deposit fiat currencies on Kraken Pro and the bot does everything else for you.
Bitcoin orders are placed as often as possible. To illustrate the behaviour in more detail, let's look at the following example: You deposit β¬500 per month on Kraken-Pro. The bot calculates how often you can buy Bitcoin this month, as Kraken has a minimum purchase limit of 0.0001 BTC. Your orders are executed as often as possible throughout the month, thereby achieving dollar-cost averaging.
This tool is configured via environment variables. Some environment variables are required and some activate additional functionalities.
Variable | Description | Required | Default |
---|---|---|---|
KRAKEN_PUBLIC_KEY |
Your Kraken API public key | β | |
KRAKEN_PRIVATE_KEY |
Your Kraken API private key | β | |
CURRENCY |
Your fiat currency to be used, e.g. USD or EUR | β | USD |
KRAKEN_ORDER_SIZE |
The order size to be used. This value should only be edited if you know exactly what you are doing. | β | 0.0001 |
LIMIT_ORDER_MODE |
If set to true, limit orders are placed. With a normal monthly volume, you only pay 0.25% fees per purchase instead of 0.4%. | β | false |
CHECK_DELAY |
How often the algorithm should be executed, in seconds. | β | 60 |
GOTIFY_URL |
URL to your Gotify server | β | |
GOTIFY_APP_TOKEN |
App token for the app on the Gotify server | β |
The environment variables GOTIFY_URL
and GOTIFY_APP_TOKEN
can be used to activate Gotify Push Notifications. As soon as a purchase has been made, you will immediately receive a notification so that you always have a full overview of your purchases.
docker run -d --name kraken_dca \
-e KRAKEN_PUBLIC_KEY=your-public-key \
-e KRAKEN_PRIVATE=your-private-key \
-e CURRENCY=EUR \
ghcr.io/primexz/kraken_dca:latest
vim docker-compose.yml
version: "3.8"
services:
kraken_dca:
image: ghcr.io/primexz/kraken_dca:latest
environment:
- KRAKEN_PUBLIC_KEY=your-public-key
- KRAKEN_PRIVATE_KEY=your-private-key
- CURRENCY=EUR
restart: always
docker-compose up -d
This tool can be run directly with Go for development.
KRAKEN_PUBLIC_KEY=your-public-key KRAKEN_PRIVATE_KEY=your-private-key go run .