Python-based algorithmic trading bot for Kraken, with a live Textual TUI and SQLite trade log.
4.3K
Python-based algorithmic trading bot for Kraken, with a live Textual TUI and SQLite trade log.
linux/amd64 and linux/arm64Mode is set by config/settings.toml ([mode] active = "test" or "production"), which is baked into the image at build time — it is not controlled by an environment variable. test mode paper-trades against live prices with no real orders and no Kraken keys required; production mode places real orders and requires KRAKEN_API_KEY/KRAKEN_API_SECRET, or the container exits immediately with an error.
Check which mode the tag you're pulling ships with before running it unattended. To run in test mode regardless of what's baked in, mount your own settings.toml with mode.active = "test" over /app/config/settings.toml.
# Copy and configure your Kraken API keys (required if the image is in production mode)
cp .env.example .env
# Run headless
docker run --rm \
--env-file .env \
-v $(pwd)/cryptotrader.db:/app/cryptotrader.db \
docker.io/pkumaschow/cryptotrader:latest
# Run with interactive TUI
docker run --rm -it \
--env-file .env \
-v $(pwd)/cryptotrader.db:/app/cryptotrader.db \
docker.io/pkumaschow/cryptotrader:latest --tui
Environment Variables
Required only when the image is running in production mode.
┌───────────────────┬──────────────────────────────────────────────────┐
│ Variable │ Description │
├───────────────────┼──────────────────────────────────────────────────┤
│ KRAKEN_API_KEY │ Kraken API key (required for production mode) │
├───────────────────┼──────────────────────────────────────────
│ KRAKEN_API_SECRET │ Kraken API secret (required for production mode) │
└───────────────────┴──────────────────────────────────────────
Makefile
A Makefile is included for convenience. Supports both Docker an
make build # build locally
make run # run headless
make tui # run with TUI
make run CTR=podman # use Podman instead of Docker
▎ Podman / SELinux note: On Fedora/RHEL the volume mount requires the :Z relabel flag. The Makefile handles this automatically.
Database Persistence
The SQLite database is bind-mounted from the host. The file is created automatically on first run. Mount it to preserve trade history across container
restarts:
-v $(pwd)/cryptotrader.db:/app/cryptotrader.db
Source
github.com/pkumaschow/cryptotrader
Docs
https://pkumaschow.github.io/cryptotrader/
Content type
Image
Digest
sha256:3b1f5b789…
Size
58.9 MB
Last updated
8 days ago
docker pull pkumaschow/cryptotrader