Krakipy
Krakipy is an easy to use Kraken API.
It uses the REST-API of the Kraken.com cryptocurrency exchange.
For more information please visit the krakipy documentation
29.10.2023 - Updated krakipy to include new functions and fixed bugs
31.07.2021 - Updated krakipy to support staking and unstaking
Features
- All methods of the Kraken Rest API are included (Krakipy documentation also updated)
- Easy and fast to use
- Two factor authentification support (static and OTP)
- Tor support
Installation
Use the package manager pip to install krakipy.
pip install krakipy
Usage Examples
Public Requests
Public requests dont need API keys.
from krakipy import KrakenAPI
kr = KrakenAPI()
kr.get_ticker_information("XXBTZEUR")
kr.get_ohlc_data("XDGUSDT")
kr.get_recent_spreads("XETHZUSD")
kr.get_system_status()
Private Requests
Private requests need a valid API key pair to your Kraken account for validation.
from krakipy import KrakenAPI
api_key = "*************************************************"
api_key_secret = "*************************************************"
kr = KrakenAPI(api_key, api_key_secret)
kr.add_standard_order("XXBTZEUR", "buy", "limit", volume = 1.5, price = 100000.0)
->
{'descr': {'order': 'buy 1.50000000 XBTEUR @ limit 100000.0'},
'txid': ['OHPCQQ-HRJTQ-ZBDGSE']}
kr.get_account_balance()
kr.withdraw("XBT", "myBTCWallet", 1.0)
kr.unstake_asset("DOT", 300.0)
kr.retrieve_export_report(report_id, dir="kraken_reports/")
License
The krakipy code is licensed under the MIT LICENSE.
This program comes with ABSOLUTELY NO WARRANTY
Krakipy Copyright (C) 2020-2023 Hubertus Wilisch