{
"info": {
"author": "xnr-k",
"author_email": "xnr.k@protonmail.com",
"bugtrack_url": null,
"classifiers": [
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7"
],
"description": "# CryptoWrapper\n\n> Python 3.7+
\n\n> PEP8
\n\n> Async support (without cache)
\n\n> Handles configurable requests cache, retries and general request errors.\n\n
\n\n### Installation:\n\n`pip install xnr-cryptowrapper`
\n\n### Functions:\n\nBuild around raw API commands, in order to allow users to more freely implement their own logic.
\nEach APIs endpoints are made directly available by the CryptoWrapper class.
\nMore detailed informations contained in the docs below:
\n\n| | Description |\n|------------------------------------------------|:---------------------------------:|\n| [CoinMarketCap.md](/bin/docs/CoinMarketCap.md) | Wrapper for the CoinMarketCap API |\n| [CryptoCompare.md](/bin/docs/CryptoCompare.md) | Wrapper for the CryptoCompare API |\n| [BitMEX.md](/bin/docs/BitMEX.md) | Wrapper for the BitMEX REST API |\n| [Binance.md](/bin/docs/Binance.md) | Wrapper for the Binance APIs |\n| [BinanceDEX.md](/bin/docs/BinanceDEX.md) | Wrapper for the Binance DEX API |\n| [Bitfinex.md](/bin/docs/Bitfinex.md) | Wrapper for the Bitfinex API |\n| [Deribit.md](/bin/docs/Deribit.md) | Wrapper for the Deribit API |\n\n
\n\n### Examples:\n\nIf unspecified, result will not be cached.
\nRetries avoided for errors (400, 401, 403, 404, 429, 500).
\nRate limits informations generally present in responses to simplify the implementation of back off strategies.
\n\nCoinMarketCap.global_aggregate_metrics_latest_GET()\n```python\n>>> from cryptowrapper import CryptoWrapper\n>>> api_key = \"Declare you API key\"\n>>> cmc = CryptoWrapper(api=\"CMC\", api_key=api_key, cache_expire=240)\n>>> cmc_wrapper = cmc.wrapper\n>>> cmc_wrapper.global_aggregate_metrics_latest_GET(convert=\"GBP\")\n{\n 'status': {\n 'timestamp': '2019-02-02T10:36:40.928Z',\n 'error_code': 0,\n 'error_message': None,\n 'elapsed': 6,\n 'credit_count': 1\n },\n 'data': {\n 'active_cryptocurrencies': 2104,\n 'active_market_pairs': 15817,\n 'active_exchanges': 235,\n 'eth_dominance': 9.87368,\n 'btc_dominance': 53.2881,\n 'quote': {\n 'GBP': {\n 'total_market_cap': 87645952771.31316,\n 'total_volume_24h': 12135287028.006516,\n 'last_updated': '2019-02-02T10:36:00.000Z'\n }\n },\n 'last_updated': '2019-02-02T10:27:00.000Z'\n },\n 'cached': False\n}\n```\n\n
\n\nBitMEX.chat_GET()\n```python\n>>> from cryptowrapper import CryptoWrapper\n>>> api_key = \"Declare you API key\"\n>>> api_secret = \"Declare you API secret\"\n>>> bitmex = CryptoWrapper(api=\"BitMEX\", api_key=api_key, api_secret=api_secret)\n>>> bitmex_wrapper = bitmex.wrapper\n>>> bitmex_wrapper.chat_GET(count=2)\n[\n {\n 'id': 1,\n 'date': '2014-11-24T12:00:21.539Z',\n 'user': 'BitMEX_Sam',\n 'message': 'Welcome to BitMEX! We are live.',\n 'html': 'Welcome to BitMEX! We are live.',\n 'fromBot': False,\n 'channelID': 1,\n 'cached': False\n },\n {\n 'id': 2,\n 'date': '2014-11-24T12:20:29.073Z',\n 'user': 'BitMEX_Arthur',\n 'message': 'Hello World',\n 'html': 'Hello World',\n 'fromBot': False,\n 'channelID': 1,\n 'cached': False\n },\n {\n 'ratelimit': {\n 'limit': '150',\n 'remaining': '149',\n 'reset': '1549626408'\n }\n }\n]\n```\n\n
\n\nBinance.ping_GET()\n```python\n>>> from cryptowrapper import CryptoWrapper\n>>> binance = CryptoWrapper(api=\"Binance\")\n>>> binance_wrapper = binance.wrapper\n>>> binance_wrapper.ping_GET()\n{\n 'cached': False\n}\n```\n\n
\n\nBinanceDEX.__getfunctions__()\n```python\n>>> from cryptowrapper import CryptoWrapper\n>>> binance_dex = CryptoWrapper(api=\"BinanceDEX\")\n>>> binance_dex_wrapper = binance_dex.wrapper\n>>> binance_dex_wrapper.__getfunctions__()\n[\n 'account_GET',\n 'account_sequence_GET',\n 'block_exchange_fee_GET',\n 'broadcast_POST',\n 'depth_GET',\n 'fees_GET',\n 'klines_GET',\n 'markets_GET',\n 'node_info_GET',\n 'orders_closed_GET',\n 'orders_id_GET',\n 'orders_open_GET',\n 'peers_GET',\n 'ticker_24h_GET',\n 'time_GET',\n 'tokens_GET',\n 'trades_GET',\n 'transaction_GET',\n 'transactions_GET',\n 'transactions_in_block_GET',\n 'validators_GET'\n]\n```\n\n
\n\nFor a quick combined example see: [example.py](/test/example.py)
\nFor the async version see: [async_example.py](/test/async_example.py)\n\n
\n\n### Feedback:\n\nConstructive feedback & bug reports are welcome.
\nContact informations:\n* github \n\n\n",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/xnr-k/cryptowrapper",
"keywords": "",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "xnr-cryptowrapper",
"package_url": "https://pypi.org/project/xnr-cryptowrapper/",
"platform": "",
"project_url": "https://pypi.org/project/xnr-cryptowrapper/",
"project_urls": {
"Homepage": "https://github.com/xnr-k/cryptowrapper"
},
"release_url": "https://pypi.org/project/xnr-cryptowrapper/0.1.1/",
"requires_dist": [
"requests (>=2.22.0)",
"requests-async (>=0.6.2)",
"requests-cache (>=0.5.2)"
],
"requires_python": "",
"summary": "Wrapper around Cryptocurrency related APIs",
"version": "0.1.1"
},
"last_serial": 5782573,
"releases": {
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "71589cafa46696ef15a72968b75ed225",
"sha256": "715867a3b4911f502676a0e9def338e468a8d30a41f34334ec41ef3bb35c413a"
},
"downloads": -1,
"filename": "xnr_cryptowrapper-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "71589cafa46696ef15a72968b75ed225",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 11388,
"upload_time": "2019-04-16T17:00:03",
"url": "https://files.pythonhosted.org/packages/2b/a8/2e23ad9e2920d859cf4c80ec02a8dfed6274344099bb34d4232d4a26da43/xnr_cryptowrapper-0.1.0-py3-none-any.whl"
}
],
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "9fcc2a63a17462499ab553185b92ca2a",
"sha256": "6c44904b1a4f675346621c74e94f543181e4a2e1f53cc64c7519b8f968c7494e"
},
"downloads": -1,
"filename": "xnr_cryptowrapper-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9fcc2a63a17462499ab553185b92ca2a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 12490,
"upload_time": "2019-09-04T17:12:23",
"url": "https://files.pythonhosted.org/packages/42/3f/7cd7b7eb17a0b54daa26a9bc9936e81a72a104c16e11b0ee8f6e15ef50d4/xnr_cryptowrapper-0.1.1-py3-none-any.whl"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "9fcc2a63a17462499ab553185b92ca2a",
"sha256": "6c44904b1a4f675346621c74e94f543181e4a2e1f53cc64c7519b8f968c7494e"
},
"downloads": -1,
"filename": "xnr_cryptowrapper-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9fcc2a63a17462499ab553185b92ca2a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 12490,
"upload_time": "2019-09-04T17:12:23",
"url": "https://files.pythonhosted.org/packages/42/3f/7cd7b7eb17a0b54daa26a9bc9936e81a72a104c16e11b0ee8f6e15ef50d4/xnr_cryptowrapper-0.1.1-py3-none-any.whl"
}
]
}