Registry / http-networking / python-kraken-sdk

python-kraken-sdk

JSON →
library3.2.8pypypiunverified

A comprehensive Python SDK for the Kraken cryptocurrency exchange, providing both REST and WebSocket clients for Spot and Futures trading. Version 3.2.8 requires Python >=3.11. Released monthly.

pip install python-kraken-sdk
INSTALL
IMPORT
SIG · PYTHON-KRAKEN-SDK
P
python-kraken-sdk
http-networkingpythonv3.2.8
Install
3.8s avg
Import
Disk
29MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.6.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 23.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.000s · 24MB
29MB installed
● package 29MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

KrakenSpot
from kraken.spot import KrakenSpot
from kraken.spot import KrakenSpot

Initialize a Spot client and fetch account balance (requires API keys).

import os from kraken.spot import KrakenSpot api_key = os.environ.get('KRAKEN_API_KEY', '') secret_key = os.environ.get('KRAKEN_SECRET_KEY', '') client = KrakenSpot(api_key=api_key, secret_key=secret_key) print(client.get_account_balance())
Debug
Known issues
breakingIn v3.x, the package structure changed: all modules are under `kraken.spot` and `kraken.futures`. Previously, top-level imports like `from kraken import Market` no longer work.
fix
Use `from kraken.spot import Market` instead.
affects: >=3.0.0
gotchaWebSocket clients (KrakenSpotWS, KrakenFuturesWS) require explicit connection and disconnection. Using them without calling `connect()` or forgetting `stop()` can cause resource leaks.
fix
Always use context managers or try/finally to connect and disconnect.
affects: all
deprecatedMethods `async_close` and `stop` on websocket clients are deprecated in v3.1.6+. Use `disconnect()` instead.
fix
Replace `async_close()` or `stop()` with `disconnect()`.
affects: >=3.1.6
gotchaThe `create_order` parameter `stp_type` must be sent as `stptype` to the API. In v3.2.2, the SDK incorrectly used `stp_type`. This was fixed in v3.2.2+.
fix
Upgrade to >=3.2.2 or pass `stptype` manually if using older version.
affects: <3.2.2
breakingIn v3.0.0, the minimum Python version was raised to 3.11. Python 3.10 and below are no longer supported.
fix
Use Python 3.11 or later.
affects: >=3.0.0
Upgrade
Version history
3.2.8latest on PyPI · released Apr 18, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
18
OpenAI (training)
1
Resources
python-kraken-sdk — pip install python-kraken-sdk · libregistry