Skip to main content

A Python implementation of the Kraken API.

Project description

Implements the Kraken API methods using the low-level krakenex python package. See

https://www.kraken.com/help/api

and

https://github.com/veox/python3-krakenex

Quick Start

pykrakenapi can be installed via pip from PyPI

$ pip install pykrakenapi

Then, import and get started with:

>>> from pykrakenapi import KrakenAPI
>>> help(KrakenAPI)

Example

import krakenex
from pykrakenapi import KrakenAPI
api = krakenex.API()
k = KrakenAPI(api)
ohlc, last = k.get_ohlc_data("BCHUSD")
print(ohlc)
                           time    open    high     low   close    vwap       volume  count
dtime
2017-11-19 18:31:00  1511116260  1175.0  1175.0  1175.0  1175.0     0.0   0.00000000      0
2017-11-19 18:30:00  1511116200  1175.0  1175.0  1175.0  1175.0     0.0   0.00000000      0
2017-11-19 18:29:00  1511116140  1175.0  1175.0  1175.0  1175.0  1175.0   0.30000000      1
2017-11-19 18:28:00  1511116080  1171.2  1175.0  1170.3  1170.3  1174.9  10.02137467      3
2017-11-19 18:27:00  1511116020  1166.4  1171.2  1166.4  1171.2  1171.2   0.20043000      1
...                         ...     ...     ...     ...     ...     ...          ...    ...
2017-11-19 06:36:00  1511073360  1217.5  1217.5  1217.5  1217.5     0.0   0.00000000      0
2017-11-19 06:35:00  1511073300  1219.7  1219.7  1217.5  1217.5  1218.8   2.60803000      5
2017-11-19 06:34:00  1511073240  1221.3  1221.3  1221.3  1221.3     0.0   0.00000000      0
2017-11-19 06:33:00  1511073180  1220.4  1221.3  1210.7  1221.3  1216.3  17.37500000     11
2017-11-19 06:32:00  1511073120  1222.0  1222.0  1222.0  1222.0     0.0   0.00000000      0

[713 rows x 8 columns]

Documentation

See the docstrings of the methods of the KrakenAPI class.

>>> from pykrakenapi import KrakenAPI
>>> help(KrakenAPI)

Development

This package should be considered early alpha state. Contributions in any way, shape or form are absolutely welcome!

Bug Reports

To search for bugs or report them, please use the bug tracker: https://github.com/dominiktraxl/pykrakenapi/issues

Licence

Distributed with a GNU GPL:

Copyright (C) 2017 pykrakenapi Developers
Dominik Traxl <dominik.traxl@posteo.org>

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

pykrakenapi-0.0.1.tar.gz (16.0 kB view details)

Uploaded Source

File details

Details for the file pykrakenapi-0.0.1.tar.gz.

File metadata

  • Download URL: pykrakenapi-0.0.1.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pykrakenapi-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a5d1b4b8a79e6c0cdf15797ab67dff4965b2ef5508fd311d84aeefaa858001ac
MD5 af96927a4b23c573f400f8d4d675db92
BLAKE2b-256 b74436bcc9469ff8efe0224e507f599829c75b43580d563e4a789ae217b194e1

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