Skip to content

Commit

Permalink
A the Spot order book client (kraken.spot.OrderbookClient) (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
btschwertfeger authored Jun 10, 2023
1 parent af289f0 commit d5a3d7c
Show file tree
Hide file tree
Showing 42 changed files with 3,125 additions and 1,379 deletions.
File renamed without changes.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ repos:
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: end-of-file-fixer
- id: pretty-format-json
- id: detect-private-key
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
Expand Down
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,25 @@

## [Unreleased](https://github.com/btschwertfeger/python-kraken-sdk/tree/HEAD)

[Full Changelog](https://github.com/btschwertfeger/python-kraken-sdk/compare/v1.2.0...HEAD)
[Full Changelog](https://github.com/btschwertfeger/python-kraken-sdk/compare/v1.3.0...HEAD)

**Implemented enhancements:**

- Add the `truncate` parameter to `create_order` of the Spot websocket client [\#111](https://github.com/btschwertfeger/python-kraken-sdk/issues/111)
- Add the `truncate` parameter to create_order of the Spot websocket clients' `create_order` and `cancel_order`+ `kraken.spot.Trade.edit_order` [\#113](https://github.com/btschwertfeger/python-kraken-sdk/pull/113) ([btschwertfeger](https://github.com/btschwertfeger))

Uncategorized merged pull requests:

- Update `/examples/spot_orderbook.py` [\#110](https://github.com/btschwertfeger/python-kraken-sdk/pull/110) ([btschwertfeger](https://github.com/btschwertfeger))

## [v1.3.0](https://github.com/btschwertfeger/python-kraken-sdk/tree/v1.3.0) (2023-05-24)

[Full Changelog](https://github.com/btschwertfeger/python-kraken-sdk/compare/v1.2.0...v1.3.0)

**Breaking changes:**

- Rename `kraken.futures.User.get_unwindqueue` to `kraken.futures.User.get_unwind_queue` [\#107](https://github.com/btschwertfeger/python-kraken-sdk/issues/107)
- Prepare release v1.3.0 [\#99](https://github.com/btschwertfeger/python-kraken-sdk/pull/99) ([btschwertfeger](https://github.com/btschwertfeger))
- Change `kraken.spot.User.get_balances` and add `kraken.spot.User.get_balance` [\#98](https://github.com/btschwertfeger/python-kraken-sdk/pull/98) ([btschwertfeger](https://github.com/btschwertfeger))
- Rename `get_tradeable_asset_pair` to `get_asset_pairs` and make the `pair` parameter optional [\#93](https://github.com/btschwertfeger/python-kraken-sdk/pull/93) ([btschwertfeger](https://github.com/btschwertfeger))
- Extend typing + add `KrakenUnknownMethodError` and `KrakenBadRequestError` + Fix \#65 [\#87](https://github.com/btschwertfeger/python-kraken-sdk/pull/87) ([btschwertfeger](https://github.com/btschwertfeger))
Expand All @@ -24,6 +39,7 @@

**Closed issues:**

- Add a realtime Spot order book example [\#103](https://github.com/btschwertfeger/python-kraken-sdk/issues/103)
- `kraken.spot.Trade.create_order`: documentatoin for txid outdated. [\#96](https://github.com/btschwertfeger/python-kraken-sdk/issues/96)
- Create `CONTRIBUTING.md` [\#91](https://github.com/btschwertfeger/python-kraken-sdk/issues/91)
- Extend the typing - using mypy [\#84](https://github.com/btschwertfeger/python-kraken-sdk/issues/84)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ python3 -m pip install python-kraken-sdk
### 2. Register at Kraken and generate API Keys:

- Spot Trading: https://www.kraken.com/u/security/api
- Futures Trading: https://futures.kraken.com/trade/settings/api
- Futures Trading: https://futures.kraken.com/trade/settings/api (see _[help](https://docs.futures.kraken.com/#introduction-generate-api-keys)_)
- Futures Sandbox: https://demo-futures.kraken.com/settings/api

### 3. Start using the provided example scripts
Expand Down Expand Up @@ -177,7 +177,7 @@ import time
import asyncio
from kraken.spot import KrakenSpotWSClient

async def main() -> None:
async def main()

key = "kraken-public-key"
secret = "kraken-secret-key"
Expand Down
10 changes: 5 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ Welcome to Python Kraken SDK's documentation!
|Release date badge| |Release version badge| |DOI badge|

.. toctree::
:maxdepth: 2
:caption: Contents:
:maxdepth: 2

src/introduction.rst
src/getting_started/getting_started.rst
src/examples/trading_bot_templates.rst
src/issues.rst
src/spot/spot_rest.rst
src/spot/spot_websocket.rst
src/futures/futures_rest.rst
src/futures/futures_websocket.rst
src/spot/rest.rst
src/spot/websockets.rst
src/futures/rest.rst
src/futures/websockets.rst
src/base_api/base_api.rst
src/krakenexceptions/krakenexceptions.rst
src/about/license.rst
Expand Down
3 changes: 1 addition & 2 deletions docs/src/about/license.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

.. _section-license:

License
=======
=========

.. include:: ../../../LICENSE
6 changes: 5 additions & 1 deletion docs/src/examples/spot_orderbook.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
.. The spot orderbook
Maintain a valid Spot order book
--------------------------------

The following example demonstrate how to use the python-kraken-sdk to
retrieve a valid realtime order book. Please see the following example
snippet for more information.

--------------------------------
References:
- https://gist.github.com/btschwertfeger/6eea0eeff193f7cd1b262cfce4f0eb51


.. literalinclude:: ../../../examples/spot_orderbook.py
:language: python
:linenos:
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Futures REST Clients
=====================
Futures REST
============

.. autoclass:: kraken.futures.User
:members:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Futures Websocket Client
========================
Futures Websockets
==================

.. autoclass:: kraken.futures.KrakenFuturesWSClient
:members:
Expand Down
2 changes: 2 additions & 0 deletions docs/src/issues.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Known Issues
============

Issues listed here: `python-kraken-sdk/issues`_

Futures Trading
---------------

Expand Down
4 changes: 2 additions & 2 deletions docs/src/spot/spot_rest.rst → docs/src/spot/rest.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Spot REST Clients
==================
Spot REST
=========

.. autoclass:: kraken.spot.User
:members:
Expand Down
7 changes: 0 additions & 7 deletions docs/src/spot/spot_websocket.rst

This file was deleted.

12 changes: 12 additions & 0 deletions docs/src/spot/websockets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Spot Websockets
===============

.. autoclass:: kraken.spot.KrakenSpotWSClient
:members:
:show-inheritance:
:inherited-members:

.. autoclass:: kraken.spot.OrderbookClient
:members:
:show-inheritance:
:inherited-members:
Loading

0 comments on commit d5a3d7c

Please sign in to comment.