Giter Club home page Giter Club logo

pykrakenapi's Introduction

pykrakenapi

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

Whenever convenient, methods return pandas.DataFrame objects. Also implements a call rate limiter based on your Kraken tier level, as well as automatic retries on HTTPErrors/Kraken API Errors.

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)

pykrakenapi requires Python >= 3.3, krakenex >= 2.0.0 and pandas. These requirements should be installed automatically via pip.

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 beta state, since some methods have not been properly tested yet. Contributions in any way, shape or form are 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 <[email protected]>

pykrakenapi's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.