Skip to main content

A user friendly Kraken API client using pydantic 🐙

Project description

Kraken-pull

A user friendly Kraken API client using pydantic 🐙

🚧 This repo is still a work in progress 🚧

Installation 💿

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

pip install krakenpull

Usage 🪚

Initialize a kraken client with the the get_kraken_client function:

from krakenpull import get_kraken_client

client = get_kraken_client(key, private_key)

Common methods and features:

# get account balance
balances = client.get_account_balance()
print(balances) # {Currency.BTC: 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.BTC, 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-0.1.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

krakenpull-0.1.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for krakenpull-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8e317e0a24d370b5231b8e84ef4ebb843d9e99b709c86515c5377cf765c6bb70
MD5 65c9fb68667ba8e9b37bbd966d0c0215
BLAKE2b-256 6fbb7e1bbab69538d4f7a8440fc09f491724f038e7d68d1d14e038d7b66087b7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for krakenpull-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa86fd002276d1b734efd5cb37a8f188daaac5f9897939c4d323608ff25007ec
MD5 765370ba12ea8cb69181ff2d6d2d3efa
BLAKE2b-256 d81a6034dd7d8bdf2f71380efd8354c4a6a806bc83a7c00854cb6c16765a2400

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