python-kraken-sdk
Command-line tool and collection of REST and websocket clients to interact with the Kraken Crypto Asset Exchange.
What it is and what it does
This is an unofficial Python SDK for the Kraken Crypto Asset Exchange, providing both programmatic and command-line access to Spot, xStocks, and Futures trading. It wraps Kraken's REST and WebSocket APIs with synchronous and asynchronous clients, custom exception handling, and a CLI tool that handles authentication in the background. The package supports public endpoints (market data, server time) and private endpoints (account balances, trading) across both Spot and Futures markets.
The SDK is built on standard async libraries (aiohttp, websockets) and includes example scripts and pytest test coverage. It is actively maintained and tested against live API endpoints. The authors explicitly disclaim responsibility for trading losses and note this is independent third-party software not endorsed by Kraken or Payward Ltd.
Use it for:
- Build automated trading bots that monitor Spot or Futures markets and execute orders programmatically.
- Query account balances, open positions, and trade history without writing raw HTTP requests.
- Stream real-time order book or trade data via WebSocket for low-latency market monitoring.
- Access Kraken's public market data (candles, ticker, spreads) for backtesting or analysis.
- Prototype trading strategies using the async client for concurrent API calls.
- Use the CLI to manually query Kraken endpoints for debugging or ad-hoc operations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides REST and WebSocket clients for trading on Kraken's Spot and Futures markets, plus a command-line interface for direct API access.
Yes, with conditions. Install if you are building a Kraken trading application and want a maintained, low-friction SDK with both sync and async support. Do not install if you require guaranteed official support or cannot tolerate third-party software risk—this is explicitly unofficial and the authors disclaim liability for losses. Pin the version to avoid unexpected behavior on new releases, as recommended in the documentation.
Install
python-kraken-sdk on PyPI
pip
pip install python-kraken-sdkuv
uv add python-kraken-sdkpoetry
poetry add python-kraken-sdkInstalling python-kraken-sdk
Before you install
Low friction install with six common runtime dependencies (requests, websockets, click, cloup, orjson, aiohttp). Package is actively maintained with a release 38 days ago and recent commits; supports current Python versions (3.11–3.14).
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install python-kraken-sdk
from kraken.spot import SpotClient
client = SpotClient(key="<api-key>", secret="<secret-key>")
print(client.request("POST", "/0/private/Balance"))
Requires Kraken API keys (generated at https://www.kraken.com/u/security/api for Spot or https://futures.kraken.com/trade/settings/api for Futures) and Python >=3.11.
Verify before relying
- Whether all Kraken Spot and Futures API endpoints are fully implemented or if some require direct request() calls.
- Rate-limiting behavior and retry logic when hitting Kraken's API throttles.
- Whether xStocks capability is feature-complete or still in development.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — requests, websockets, click, cloup, orjson, aiohttp |
| Maintenance | actively maintained — 38 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 131,136/month — #11,602 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_kraken_sdk-3.3.0-py3-none-any.whl
Keywords: crypto, trading, kraken, exchange, api, sdk, automation
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
krakenexProvides a minimal Python interface to the…
copyleft · top 15,000 on PyPI
python-okxUnofficial Python wrapper for the OKX exchange…
permissive · top 15,000 on PyPI
python-binanceUnofficial Python wrapper for the Binance…
permissive · top 15,000 on PyPI
moonraker-apiFully async Python client for connecting to and…
copyleft · top 15,000 on PyPI
binance-connectorConnects Python applications to Binance's…
permissive · top 15,000 on PyPI
ebaysdkProgrammatic interface to eBay's Finding,…
copyleft · top 15,000 on PyPI
freqtradeFreqtrade is a Python-based cryptocurrency…
copyleft · top 15,000 on PyPI
alpaca-pyAlpaca-py is the official Python SDK for…
permissive · top 5,000 on PyPI
coinbase-advanced-pyOfficial Python SDK for the Coinbase Advanced…
permissive · top 15,000 on PyPI
ccxtCCXT is a unified API library for connecting to…
permissive · top 5,000 on PyPI