# Krakipy
[![PyPI version](https://badge.fury.io/py/krakipy.svg)](https://badge.fury.io/py/krakipy)
[![Documentation Status](https://readthedocs.org/projects/krakipy/badge/?version=latest)](https://krakipy.readthedocs.io/en/latest/?badge=latest)
[![Downloads](https://pepy.tech/badge/krakipy)](https://pepy.tech/project/krakipy)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/Aionoso/Krakipy/blob/master/LICENSE)
Krakipy is an easy to use Kraken API.
It uses the [REST-API](https://docs.kraken.com/rest/#section/General-Usage) of the [Kraken.com](https://www.kraken.com) cryptocurrency exchange.
For more information please visit the [krakipy documentation](https://krakipy.readthedocs.io/en/latest/)
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](https://pip.pypa.io/en/stable/) to install krakipy.
```bash
pip install krakipy
```
## Usage Examples
### Public Requests
Public requests dont need API keys.
```python
from krakipy import KrakenAPI
# Create a session
kr = KrakenAPI()
# Get Ticker for Bitcoin/EUR
kr.get_ticker_information("XXBTZEUR")
# Get OHLC for Doge/Tether
kr.get_ohlc_data("XDGUSDT")
# Get Spreads for Ether/USD
kr.get_recent_spreads("XETHZUSD")
# Check the Kraken API system status
kr.get_system_status()
```
### Private Requests
Private requests need a valid API key pair to your Kraken account for validation.
```python
from krakipy import KrakenAPI
api_key = "*************************************************"
api_key_secret = "*************************************************"
# Create a validated session
kr = KrakenAPI(api_key, api_key_secret)
# Create a Limit order to buy 1.5 Bitcoin under 100,000.0 EUR/BTC
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']}
# Check your account balance
kr.get_account_balance()
# Withdraw 1.0 Bitcoin to myBTCWallet
kr.withdraw("XBT", "myBTCWallet", 1.0)
# Unstake 300.0 Polkadot
kr.unstake_asset("DOT", 300.0)
# Download and save an export report to kraken_reports/
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
Raw data
{
"_id": null,
"home_page": "https://krakipy.readthedocs.io/en/latest/",
"name": "krakipy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.3",
"maintainer_email": "",
"keywords": "kraken api crypto finance bitcoin tor mit",
"author": "Hubertus Wilisch",
"author_email": "aionoso-software@outlook.de",
"download_url": "",
"platform": null,
"description": "# Krakipy\n\n[![PyPI version](https://badge.fury.io/py/krakipy.svg)](https://badge.fury.io/py/krakipy)\n[![Documentation Status](https://readthedocs.org/projects/krakipy/badge/?version=latest)](https://krakipy.readthedocs.io/en/latest/?badge=latest)\n[![Downloads](https://pepy.tech/badge/krakipy)](https://pepy.tech/project/krakipy)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/Aionoso/Krakipy/blob/master/LICENSE)\n\nKrakipy is an easy to use Kraken API.\nIt uses the [REST-API](https://docs.kraken.com/rest/#section/General-Usage) of the [Kraken.com](https://www.kraken.com) cryptocurrency exchange.\n\nFor more information please visit the [krakipy documentation](https://krakipy.readthedocs.io/en/latest/)\n\n29.10.2023 - Updated krakipy to include new functions and fixed bugs\n31.07.2021 - Updated krakipy to support staking and unstaking\n\n\n### Features\n- All methods of the Kraken Rest API are included (Krakipy documentation also updated)\n- Easy and fast to use\n- Two factor authentification support (static and OTP)\n- Tor support\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install krakipy.\n\n```bash\npip install krakipy\n```\n\n## Usage Examples\n\n### Public Requests\n\nPublic requests dont need API keys.\n\n```python\nfrom krakipy import KrakenAPI\n\n# Create a session\nkr = KrakenAPI()\n\n\n# Get Ticker for Bitcoin/EUR\nkr.get_ticker_information(\"XXBTZEUR\")\n\n# Get OHLC for Doge/Tether\nkr.get_ohlc_data(\"XDGUSDT\")\n\n# Get Spreads for Ether/USD\nkr.get_recent_spreads(\"XETHZUSD\")\n\n# Check the Kraken API system status\nkr.get_system_status()\n```\n\n### Private Requests\n\nPrivate requests need a valid API key pair to your Kraken account for validation.\n\n```python\nfrom krakipy import KrakenAPI\n\napi_key = \"*************************************************\"\napi_key_secret = \"*************************************************\"\n\n# Create a validated session\nkr = KrakenAPI(api_key, api_key_secret)\n\n\n# Create a Limit order to buy 1.5 Bitcoin under 100,000.0 EUR/BTC\nkr.add_standard_order(\"XXBTZEUR\", \"buy\", \"limit\", volume = 1.5, price = 100000.0)\n->\n{'descr': {'order': 'buy 1.50000000 XBTEUR @ limit 100000.0'},\n 'txid': ['OHPCQQ-HRJTQ-ZBDGSE']}\n\n\n# Check your account balance\nkr.get_account_balance()\n\n# Withdraw 1.0 Bitcoin to myBTCWallet\nkr.withdraw(\"XBT\", \"myBTCWallet\", 1.0)\n\n# Unstake 300.0 Polkadot\nkr.unstake_asset(\"DOT\", 300.0)\n\n# Download and save an export report to kraken_reports/\nkr.retrieve_export_report(report_id, dir=\"kraken_reports/\")\n```\n\n## License\n\nThe krakipy code is licensed under the MIT LICENSE.\nThis program comes with ABSOLUTELY NO WARRANTY\n\nKrakipy Copyright (C) 2020-2023 Hubertus Wilisch\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "A well-documented Python API for the Kraken Cryptocurrency Exchange",
"version": "0.1.9",
"project_urls": {
"Homepage": "https://krakipy.readthedocs.io/en/latest/",
"Source": "https://github.com/Aionoso/Krakipy"
},
"split_keywords": [
"kraken",
"api",
"crypto",
"finance",
"bitcoin",
"tor",
"mit"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f480219fe26f7c162023d1387b9c4d7ada6343a67fc952eca7cb1da860e6f469",
"md5": "7a2be80c2e840ce42621c12feae8eed9",
"sha256": "89687f7c1fa8b16259767078cac2c2b65f96feaddd25dad65626dd819ce67d8d"
},
"downloads": -1,
"filename": "krakipy-0.1.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7a2be80c2e840ce42621c12feae8eed9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.3",
"size": 18003,
"upload_time": "2023-10-29T15:20:04",
"upload_time_iso_8601": "2023-10-29T15:20:04.599280Z",
"url": "https://files.pythonhosted.org/packages/f4/80/219fe26f7c162023d1387b9c4d7ada6343a67fc952eca7cb1da860e6f469/krakipy-0.1.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-29 15:20:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Aionoso",
"github_project": "Krakipy",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "pandas",
"specs": [
[
">=",
"0.17.0"
]
]
},
{
"name": "requests",
"specs": []
},
{
"name": "pyotp",
"specs": []
},
{
"name": "torpy",
"specs": []
}
],
"lcname": "krakipy"
}