Registry / payments / krakenex

krakenex

JSON →
library2.2.2pypypi✓ verified 84d ago

Python client for the Kraken cryptocurrency exchange REST API. Current version 2.2.2, stable with infrequent releases. Supports Python >=3.3.

pip install krakenex
INSTALL
IMPORT
SIG · KRAKENEX
K
krakenex
paymentspythonv2.2.2
Install
2.9s avg
Import
606ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.2.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.638s · 22.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.9s · import 0.574s · 23MB
20MB installed
● package 20MB
Code
Verified usage

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

API
import krakenex; api = krakenex.API()
from krakenex import KrakenAPI
Wrong constructor name
Trade
from krakenex import Trade
from krakenex.trade import Trade
Trade is a module, not a direct submodule

Initialize API, load key file, query private endpoint.

import krakenex api = krakenex.API() api.load_key('kraken.key') print(api.query_private('Balance'))
Debug
Known issues
breakingVersion 2.0.0 changed the API constructor to require no arguments; old code using `API('key','secret')` will break.
fix
Use `api.load_key('filename')` or `api.key = '...'; api.secret = '...'`.
affects: >=2.0.0
gotchaThe library does not set a User-Agent header by default; Kraken may reject requests.
fix
Set `api.user_agent = 'MyApp/1.0'` after creating API instance.
affects: all
deprecatedThe `Trade` module is deprecated and may be removed in a future release. Use the raw API methods instead.
fix
Use `api.query_public('Trades', {'pair': 'XBTUSD'})` instead of `Trade().get_trades('XBTUSD')`.
affects: >=2.2.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'krakenex'
The package is installed under a different name or not installed.
fix
Run `pip install krakenex`. Ensure the correct import statement: `import krakenex`.
connect() got an unexpected keyword argument 'headers'
Library version incompatibility with requests library in older Python versions (pre-2.2.0).
fix
Upgrade krakenex: `pip install --upgrade krakenex`. If persists, pin `requests>=2.22.0`.
AttributeError: module 'krakenex' has no attribute 'API'
Outdated version (<2.0.0) that used a different API class.
fix
Upgrade krakenex: `pip install --upgrade krakenex`. Old code should use `krakenex.API` if upgraded.
Upgrade
Version history
2.2.2latest on PyPI · released Jul 1, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
42 hits · last 30 days
node
36
Amazon
1
OpenAI (training)
1
Resources
krakenex — pip install krakenex · libregistry