Skip to main content

CryptoBob package

Project description

CryptoBob

CryptoBob is a radically simple crypto currency bot, which interacts with Kraken and…

  • … automatically buys crypto currencies on a recurring basis
  • … automatically withdraws crypto currencies when a threshold is reached

CryptoBob is your perfect little sidekick, when you want to automate the purchase and storage of crypto currencies on your hardware wallet / ledger. Of course there are services out there doing this, but usually Kraken has much better fees than those services, and a much better selection of crypto ;)

Installation

Install the package via PyPi:

pip3 install cryptobob

Install the package from source:

pip3 install cryptobob@git+https://git.confirm.ch/confirm/cryptobob.git

Linux service

CryptoBob can also be run as Linux service, for example via systemd.

To use CryptoBob as service, it's recommended to create a dedicated user, or to use your personal user for it.
Creating a new Linux user can be achieved as root by running these commands:

# Create new POSIX group
groupadd -g 666 cyrptobob

# Create new POSIX user
useradd -d /home/cryptobob -m -g 666 -u 666 cryptobob

Then install CryptoBob in a dedicated Python venv by running these commands:

# Change to new cryptobob user.
su - cryptobob

# Create new venv and activate it.
python3 -mvenv ~/.venv
source .venv/bin/activate

# Install CryptoBob
pip3 install cryptobob

The user needs to have access to the configuration file, documented in the Configuration chapter.

Is your configuration ready and CryptoBob installed, you can use the example systemd service unit to configure, start, and enable a systemd service:

# Download systemd service unit.
curl -Lo /etc/systemd/system/cryptobob.service https://raw.githubusercontent.com/confirm/CryptoBob/master/example/cryptobob.service

# Reload systemd daemon
systemctl daemon-reload

# Start and enable service
systemctl enable cryptobob
systemctl start cryptobob

HINT: Please note that if you've updated the cryptobob.service file, you need to run systemctl daemon-reload again.

Usage

The usage of cryptobob is quite simple:

usage: cryptobob [-h] [-c CONFIG] [-s] [-v] {run,buy,assets,otp}

CryptoBob - The bot which buys & withdraws crypto automatically.

positional arguments:
  {run,buy,assets,otp}        action to execute

options:
  -h, --help                  show this help message and exit
  -c CONFIG, --config CONFIG  path to the CryptoBob config
  -s, --simple                enable simple logging format (e.g. for systemd)
  -v, --verbose               enable verbose logging mode (repeat to increase verbosity, up to -vvv)

To display all assets listed on Kraken, you can run:

cryptobob assets

To run CryptoBob, you can simply execute:

cryptobob run -vv

To (force) buy / execute the configured trade plans, you can run:

cryptobob buy -vv

In case you configured OTP for your API key and want to get a one-time code, you can run:

cryptobob otp

Please note you've to configure CryptoBob accordingly.
Check out the next section for the configuration.

Configuration

By default, CryptoBob is searching its configuration file under ~/.cryptobob.yml.
Feel free to change the configuration file path by specifying the -c or --config CLI flag.

You can find an example configuration in the CryptoBob repository.

IMPORTANT: The configuration file contains sensitive informations. Make sure you set the permissions right!

Runtime data

Please note CryptoBob doesn't store any runtime data or alike on your system, since it will always use the Kraken order history as a reference for upcoming orders.

For example, when CryptoBob buys a certain asset on Kraken, it will open a new buy order. That buy order is then submitted, executed, and stored on Kraken. When CryptoBob then runs again, it will retrieve the last executed order for certain asset from Kraken, compare its order timestamp with your configured interval, and checks if enough time has passed to open another buy oder.

Of course, only orders initiated by CryptoBob will be queried for the timestamps (achieved via userref on ClosedOrders).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

cryptobob-1.2.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file cryptobob-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: cryptobob-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.19

File hashes

Hashes for cryptobob-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7f7be94c714e7cc6dd9cb43207ff856b84f21064150f233e22d53367412d9556
MD5 d915efde8c653a4657624d9b0ce288f4
BLAKE2b-256 7adb2b787760a9263ded88e4e4db6a8fc78ce02764219b39ee2b3d6b08f68426

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page