Krakenex

Latest version: v2.2.2

Safety actively analyzes 681844 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

2.2.2

------------------------------

Changed
^^^^^^^
* License classifier added to ``setup.py`` to aid automatic detection.
(`145_`)

.. _145: https://github.com/veox/python3-krakenex/pull/145

2.2.1

--------------------------------

Changed
^^^^^^^
* Public endpoints were still not working. They will now be URL-encoded
as params instead of being sent as data. (`141_`)

.. _141: https://github.com/veox/python3-krakenex/pull/141

2.2.0

---------------------------------

Changed
^^^^^^^
* Public endpoints will now use a ``GET`` method, because Kraken
dropped support for ``POST``. Previously, all endpoint calls used
``POST``.

2.1.0

------------------------------

Added
^^^^^
* A ``timeout`` argument for ``API.query_public()`` or
``API.query_private()``, to set a time-out period for
that particular query. (`67`_)
* ``krakenex.API.json_options()`` to set options to the JSON
de-serialiser, to be used on query responses. (`87`_)
* An ``examples/json-options.py`` example to demonstrate
the above. (`88`_)

.. _67: https://github.com/veox/python3-krakenex/pull/67
.. _87: https://github.com/veox/python3-krakenex/pull/87
.. _88: https://github.com/veox/python3-krakenex/pull/88

Changed
^^^^^^^
* Updated examples using ``pandas`` to post-v0.17.0 sorting. (`29`_)

.. _29: https://github.com/veox/python3-krakenex/issues/29

2.0.0

-------------------------------

For a detailed list of changes, refer to the same-number releases below.

Migration instructions
^^^^^^^^^^^^^^^^^^^^^^
* Everything network-related now handled by ``requests``. See its
`docs`_ if needed. (`11`_)
* ``krakenex.API`` class no longer has a ``conn`` attribute for
connection manipulation. It has been replaced by a ``session``
attribute, which is a ``requests.Session``. For custom networking
setups, directly modify ``session`` attribute of a ``krakenex.API``
object.
* ``krakenex.API`` constructor no longer accepts ``conn`` argument
as a means of re-using an existing ``krakenex.Connection`` object.
Instead, modify ``krakenex.API.session`` if needed, same as above.
* If you were previously calling ``API.query_private()`` or
``API.query_public()`` in a ``try/except`` block, be aware that
these two may now throw a ``requests.exceptions.HTTPError`` instead
of the previous ``http.client.HTTPException``, if the
underlying ``Connection`` returns a non-`20x` status code.

.. _docs: http://docs.python-requests.org/
.. _11: https://github.com/veox/python3-krakenex/issues/11

Known issues
^^^^^^^^^^^^
* The remote servers are unstable under high load, which is most of
the time. No recovery mechanism is provided for failed queries. (`66`_)

Most importantly, queries that may seem to have failed due to a ``502``
HTTP error may in fact reach the trade execution engine, with an
unpredictable delay. See `PSA`_ for an example.

After encountering a ``502``, a subsequent call to
``krakenex.API.query_private()`` will construct a new query, with an
increased ``nonce``. When used with an ``AddOrder`` query, this may
have disastrous effects, placing a duplicate order.

To work around this, instead reuse the ``krakenex.API.response.request``
object, which is a ``requests.PreparedRequest``, saved as part of
``requests``' operation when submitting the first query. This request
can be re-sent using ``krakenex.API.session.send()``.

.. _66: https://github.com/veox/python3-krakenex/issues/66
.. _PSA: https://www.reddit.com/r/krakenex/comments/778uvh/psa_http_error_502_does_not_mean_the_query_wont/

2.0.0c2

--------------------------------

**Release candidate.** Not recommended for production use.

Changed
^^^^^^^
* Fixed bug with dependencies not getting installed when following
installation instructions in a clean virtual environment.

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.