WARNING: This software is currently in development. I consider it in
alpha state, which means that it works well enough for me but hasn’t
been thoroughly tested. There are probably undetected bugs left. Use
at your own risk!

Installation

Step 0: Create a virtualenv (optional)

You can install it in a virtualenv if you wish to keep this program and
dependencies isolated from the rest of your system, but that’s not
mandatory.

You should probably change the permissions to this file to protect it:
chmod 600 ~/.config/clikraken/kraken.key

Alternatively, you can set a path in the environment variable
CLIKRAKEN_API_KEYFILE to override the default keyfile location.

Step 3 (optional): Generate a settings file and adapt it to your needs

clikraken looks for settings in ~/.config/clikraken/settings.ini per
default.

If the settings file doesn’t exist yet, default settings are assumed.
You can see the default settings by calling
clikraken generate_settings. Currently these settings are mostly
useful for defining the default currency pair to use if the option
--pair (or -p) is not provided. The current built-in default
pair is XETHZEUR (Ethereum/Euro). You may want to change that if you
are mostly trading with another currency pair. Alternatively, you can
set the environment variable CLIKRAKEN_DEFAULT_PAIR to override the
default currency pair.

Alternatively, you can set a path in the environment variable
CLIKRAKEN_USER_SETTINGS_PATH to override the default user settings
file location.

Usage

If installed in a virtualenv, don’t forget to activate it first:
source ~/.venv/clikraken/bin/activate (When you are done using
clikraken, you can deactivate the virtualenv with deactivate.)

This command line client works by calling subcommands with their
respective options and arguments (similar to git).

Get help to see the available subcommands:

clikraken --help

Output:

usage: clikraken.py [-h] [-V] [--raw]
{generate_settings,ticker,t,depth,d,last_trades,lt,balance,bal,place,p,cancel,x,olist,ol,clist,cl}
...
Command line client for the Kraken exchange
positional arguments:
{generate_settings,ticker,t,depth,d,last_trades,lt,balance,bal,place,p,cancel,x,olist,ol,clist,cl}
available subcommands
generate_settings [clikraken] Print default settings.ini to stdout
ticker (t) [public] Get the Ticker
depth (d) [public] Get the current market depth data
last_trades (lt) [public] Get the last trades
balance (bal) [private] Get your current balance
place (p) [private] Place an order
cancel (x) [private] Cancel an order
olist (ol) [private] Get a list of your open orders
clist (cl) [private] Get a list of your closed orders
optional arguments:
-h, --help show this help message and exit
-V, --version show program version
--raw output raw json results from the API
Current default currency pair: XETHZEUR.
Create or edit the setting file /home/zertrin/.config/clikraken/settings.ini to change it.
If the setting file doesn't exist yet, you can create one by doing:
clikraken generate_settings > /home/zertrin/.config/clikraken/settings.ini
You can also set the CLIKRAKEN_DEFAULT_PAIR environment variable
which has precedence over the settings from the settings file.

Each subcommand has different optional arguments, to get information on
how to use a subcommand: