Skip to main content

A user friendly Kraken API client using pydantic 🐙

Project description

Kraken-pull

A user friendly Kraken API client using pydantic 🐙

Installation 💿

The easiest way to use krakenpull is to install via pip:

pip install krakenpull

Usage 🪚

Initialize a kraken client:

from krakenpull import Kraken

client = Kraken(key, private_key)

Common methods and features:

# get account balance
balances = client.get_account_balance()
print(balances) # {Currency.XBT: 5.23}

# get closed orders
closed_orders = client.get_closed_orders()
print(closed_orders) # [ClosedTransactions(...), ...]

# get order book
from krakenpull import Currency
order_book = client.get_order_book(currency_pair=(Currency.XBT, Currency.USD))
print(order_book) # {"asks": ["69854.10000", "17.384", 1711832989], "bids": ["69854.00000", "0.015", 1711832988]} 

Contributing 🧑‍💻

Issues, PRs and other contributions are always welcome.

Please note this repository uses black for formatting, ruff for linting and mypy for type checking.

Pre-commit hooks help to make committing easier by automating running black and ruff so if you want to make use of them, you can install them by using the following commands:

brew install pre-commit
pre-commit install

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

krakenpull-2.0.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

krakenpull-2.0.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file krakenpull-2.0.1.tar.gz.

File metadata

  • Download URL: krakenpull-2.0.1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.8 Linux/6.5.0-1025-azure

File hashes

Hashes for krakenpull-2.0.1.tar.gz
Algorithm Hash digest
SHA256 7d4bfaa296d50a2a3a29cf909b4b6c6c0009b2b94c348298ed324e130e3dd786
MD5 f940f1279c65b9805e16041dd90c0219
BLAKE2b-256 a0a8f5fc60e3bed1d6c3d134996402f4da1eaa6dcefdbc8d4d475a7a304fff6e

See more details on using hashes here.

File details

Details for the file krakenpull-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: krakenpull-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.8 Linux/6.5.0-1025-azure

File hashes

Hashes for krakenpull-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a6d3d2a5121fa25d3eb36de7cab7b4a0dd3ec67b2c93c0db6170aa39ffee8ce
MD5 d0bb1da26c3b10a2e88104a810093683
BLAKE2b-256 72471eda20e5f87b77dc4f938c2737a83da937b5cebe5eef66ac457b8c9f526b

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