This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Command-line client for the Kraken exchange

This command line client allows you to get useful public and private information from Kraken’s API and displays it in formatted tables.

Moreover you can place or cancel simple orders (only buy/sell market/limit is currently implemented).

See package on PyPI: https://pypi.python.org/pypi/clikraken

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.

mkdir -p ~/.venv  # or any folder of your choice
pyvenv ~/.venv/clikraken

And activate it:

source ~/.venv/clikraken/bin/activate

Step 1: Install clikraken

pip install clikraken

If everything went well, clikraken --version should output the program’s version without error.

Step 2: Add your API key in the file ~/.config/clikraken/kraken.key

You will need it to perform private queries to the Kraken API.

(Create the config folder if needed: mkdir -p ~/.config/clikraken)

keykeykeykeykeykeykeykeykeykeykeykeykeykeykeykeykeykeykey
secretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecret

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.

You can generate your settings.ini by doing the following:

mkdir -p ~/.config/clikraken # only if the folder doesn't exist yet
clikraken generate_settings > ~/.config/clikraken/settings.ini

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:

clikraken SUBCOMMAND --help

For example, the place subcommand has the following help:

usage: clikraken.py place [-h] [-p PAIR] [-t {market,limit}] [-s STARTTM]
                          [-e EXPIRETM] [-q] [-v]
                          {sell,buy} volume [price]

positional arguments:
  {sell,buy}
  volume
  price

optional arguments:
  -h, --help            show this help message and exit
  -p PAIR, --pair PAIR  asset pair (default: XETHZEUR)
  -t {market,limit}, --ordertype {market,limit}
                        order type. Currently implemented: [limit, market].
                        (default: limit)
  -s STARTTM, --starttm STARTTM
                        scheduled start time (default: 0)
  -e EXPIRETM, --expiretm EXPIRETM
                        expiration time (default: 0)
  -q, --viqc            volume in quote currency (default: False)
  -v, --validate        validate inputs only. do not submit order (default:
                        False)

Usage examples

Notice: Without the -p option, default currency pair is taken from the settings file or the aforementionned environment variable, defaulting to XETHZEUR if neither of those exists.

clikraken ticker
clikraken balance
clikraken depth

clikraken place buy -t limit 0.42 11.1337
clikraken place buy -t market 0.1

# without the -t option, defaults to limit orders
clikraken place sell 0.5 13.3701

clikraken cancel OUQUPX-9FBMJ-DL7L6W

Examples in another currency pair:

# BTC/EUR currency pair
clikraken ticker -p XXBTZEUR
clikraken depth -p XXBTZEUR
clikraken place buy 0.08 587.12 -p XXBTZEUR
clikraken olist -p XXBTZEUR

# ETH/BTC currency pair
clikraken ticker -p XETHXXBT
clikraken depth -p XETHXXBT
clikraken last_trades -p XETHXXBT

Upgrade

pip install -U clikraken

Attribution

clikraken code is licensed under the Apache license, Version 2.0. See the LICENSE file. For the full text, see here.

Dependencies

  • python3-krakenex is licensed under the LGPLv3 license.
  • Arrow is licensed under the Apache License, Version 2.0.
  • tabulate is licensed under the MIT Licence.
  • colorlog is licensed under the MIT Licence.

Development dependencies

  • pip install pypandoc twine wheel
Release History

Release History

0.2.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.9

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.8

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1.dev45

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1.dev22

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1.dev19

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
clikraken-0.2.1-py3-none-any.whl (23.3 kB) Copy SHA256 Checksum SHA256 py3 Wheel Nov 20, 2016
clikraken-0.2.1.tar.gz (15.7 kB) Copy SHA256 Checksum SHA256 Source Nov 20, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting