skillfed

python-kraken-sdk

Command-line tool and collection of REST and websocket clients to interact with the Kraken Crypto Asset Exchange.

python-kraken-sdk v3.3.0 131.1K downloads/30d#11,602 on PyPI83
Permissive license Apache-2.0 Active released

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-sdk

uv

uv add python-kraken-sdk

poetry

poetry add python-kraken-sdk

Installing 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

Development Status :: 5 - Production/StableFramework :: AsyncIOIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: MacOSOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet :: WWW/HTTPTopic :: Office/Business :: FinancialTopic :: Office/Business :: Financial :: InvestmentTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

kraken api client pythoncrypto trading sdkspot futures websocketkraken rest clientexchange api wrapperasync crypto tradingkraken cli tool
kraken-exchangetrading-automationasync-client

More Python Modules packages