Skip to main content

Command-line client for the Kraken exchange

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.

Installation

WARNING: This software is currently in development.

DO NOT USE for production!

You should install it in a virtualenv.

Step 1: Create a virtualenv

pyvenv ~/.venv/clikraken

And activate it:

source ~/.venv/clikraken/bin/activate

Step 2: Install dependencies

clikraken depends on the following extra modules:

  • arrow, for better handling of date and time

  • tabulate, for printing results as tables

  • python3-krakenex, for the low-level interface with the Kraken API

Somehow you need to install the dependencies manually before installing clikraken. I haven’t had success in making the dependency system of pip work consistently with python3-krakenex being only available as a Git repository yet.

Install arrow and tabulate in the activated virtualenv:

pip install arrow tabulate

Install python3-krakenex in the activated virtualenv:

pip install -e "git+https://github.com/veox/python3-krakenex.git@33b758f1f56257a35da85b0b14eb9cb1afb7b045#egg=krakenex-0.0.6"

Step 3: Install clikraken

# make sure you have installed arrow, tabulate and krakenex before!
pip install clikraken

Step 4: Add your API key in the $HOME/.config/kraken.key file

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

keykeykeykeykeykeykeykeykeykeykeykeykeykeykeykeykeykeykey
secretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecret

Usage

First activate the virtualenv:

source ~/.venv/clikraken/bin/activate

This command line client works by calling subcommands with their respective options and arguments

Get help to see the available subcommands:

clikraken --help

Output:

usage: clikraken.py [-h] [-v] [--raw]
                    {ticker,depth,last_trades,lt,balance,bal,place,cancel,olist,ol,clist,cl}
                    ...

Command line client for the Kraken exchange

positional arguments:
  {ticker,depth,last_trades,lt,balance,bal,place,cancel,olist,ol,clist,cl}
                        available subcommands
    ticker              [public] Get the Ticker
    depth               [public] Get the current market depth data
    last_trades (lt)    [public] Get the last trades
    balance (bal)       [private] Get your current balance
    place               [private] Place an order
    cancel              [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

To get information on how to use a subcommand:

clikraken SUBCOMMAND --help

You can deactivate the virtualenv with deactivate.

Upgrade

In the activated virtualenv:

pip install -U --no-deps clikraken

--no-deps is currently needed because trying to upgrade the dependency krakenex fails, because it is not available on PyPi, only as a Git repository.

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 code is licensed under the LGPLv3 license.

  • Arrow code is licensed under is licensed under the Apache License, Version 2.0.

  • tabulate code is licensed under is licensed under the MIT Licence.

Development dependencies

  • pip install pypandoc twine wheel

Project details


Download files

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

Source Distribution

clikraken-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clikraken-0.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file clikraken-0.1.0.tar.gz.

File metadata

  • Download URL: clikraken-0.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for clikraken-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c795707d5a734017f4b511d4965f0111e217e7a1632c732a5b432f428d265c55
MD5 e05793f9816529f99fd606261656490b
BLAKE2b-256 14be100f2cc04e3462136adcdf2d810df003115adcce71c0422d54ac43e7829d

See more details on using hashes here.

File details

Details for the file clikraken-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for clikraken-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb734c9de48dea4d0098c82da4e261e24e00077c9d30c030503704b45654a024
MD5 32c517bf0c3f0796aa8ecb63d55aaca0
BLAKE2b-256 3e9d709557c405552e1b3c27827a80b7239d9869ab83c15318891a9cbcd2a936

See more details on using hashes here.

Supported by

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