{
"info": {
"author": "Tony Podlaski",
"author_email": "tony@podlaski.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6"
],
"description": "=========================================\nCoPrA\n=========================================\n\n*Asyncronous Python REST and WebSocket Clients for Coinbase Pro*\n\n-----------------------------------------\n\n| |Version| |Build Status| |Docs|\n\n|\n\n| **Quick Links**: `Documentation `__ - `Source Code `__ - `PyPi `__\n\n| **Related**: `Coinbase Pro Digital Currency Exchange `__ - `Coinbase Pro REST API `_ - `Coinbase Pro WebSocket API `_\n\n-----------------------------------------\n\nIntroduction\n------------\n\nThe CoPrA \\(**Co**\\ inbase **Pr**\\ o **A**\\ sync\\) package provides asyncronous REST and WebSocket clients written in Python for use with the Coinbase Pro digital currency trading platform. To learn about Coinbase Pro's REST and WebSocket APIs as well as how to obtain an API key for authentication to those services, please see `Coinbase Pro's API documentation `__.\n\nCoPrA Features\n--------------\n\n* compatible with Python 3.5 or greater\n* utilizes Python's `asyncio `__ concurrency framework\n* open source (`MIT `__ license)\n\nREST Features\n+++++++++++++\n\n* Asyncronous REST client class with 100% of the account management, trading, and market data functionality offered by the Coinbase Pro REST API.\n* supports user authentication\n* built on **aiohttp**, the asynchronous HTTP client/server framework for asyncio and Python\n\nWebSocket Features\n++++++++++++++++++\n\n* Asyncronous WebSocket client class with callback hooks for managing every phase of a Coinbase Pro WebSocket session\n* supports user authentication\n* built on **Autobahn|Python**, the open-source (MIT) real-time framework for web, mobile & the Internet of Things.\n\n\nExamples\n--------\n\nREST\n++++\nWithout a Coinbase Pro API key, ``copra.rest.Client`` has access to all of the public market data that Coinbase makes available.\n\n.. code:: python\n\n # 24hour_stats.py\n\n import asyncio\n\n from copra.rest import Client\n\n loop = asyncio.get_event_loop()\n\n client = Client(loop)\n\n async def get_stats():\n btc_stats = await client.get_24hour_stats('BTC-USD')\n print(btc_stats)\n\n loop.run_until_complete(get_stats())\n loop.run_until_complete(client.close())\n\nRunning the above:\n\n.. code:: bash\n\n $ python3 24hour_stats.py\n {'open': '3914.96000000', 'high': '3957.10000000', 'low': '3508.00000000', 'volume': '37134.10720409', 'last': '3670.06000000', 'volume_30day': '423047.53794129'}\n\nIn conjunction with a Coinbase Pro API key, ``copra.rest.Client`` can be used to trade cryptocurrency and manage your Coinbase pro account. This example also shows how ``copra.rest.Client`` can be used as a context manager.\n\n.. code:: python\n\n # btc_account_info.py\n\n import asyncio\n\n from copra.rest import Client\n\n KEY = YOUR_API_KEY\n SECRET = YOUR_API_SECRET\n PASSPHRASE = YOUR_API_PASSPHRASE\n\n BTC_ACCOUNT_ID = YOUR_BTC_ACCOUNT_ID\n\n loop = asyncio.get_event_loop()\n\n async def get_btc_account():\n async with Client(loop, auth=True, key=KEY, \n secret=SECRET, passphrase=PASSPHRASE) as client:\n\n btc_account = await client.account(BTC_ACCOUNT_ID)\n print(btc_account)\n\n loop.run_until_complete(get_btc_account())\n\nRunning the above:\n\n.. code:: bash\n\n $ python3 btc_account_info.py\n {'id': '1b121cbe-bd4-4c42-9e31-7047632fc7c7', 'currency': 'BTC', 'balance': '26.1023109600000000', 'available': '26.09731096', 'hold': '0.0050000000000000', 'profile_id': '151d9abd-abcc-4597-ae40-b6286d72a0bd'}\n\nWebSocket\n+++++++++\n\nWhile ``copra.websocket.Client`` is meant to be overridden, but it can be used 'as is' to test the module through the command line.\n\n.. code:: python\n\n # btc_heartbeat.py\n\n import asyncio\n\n from copra.websocket import Channel, Client\n\n loop = asyncio.get_event_loop()\n\n ws = Client(loop, Channel('heartbeat', 'BTC-USD'))\n\n try:\n loop.run_forever()\n except KeyboardInterrupt:\n loop.run_until_complete(ws.close())\n loop.close()\n\nRunning the above:\n\n.. code:: bash\n\n $ python3 btc_heartbeat.py\n {'type': 'subscriptions', 'channels': [{'name': 'heartbeat', 'product_ids': ['BTC-USD']}]}\n {'type': 'heartbeat', 'last_trade_id': 45950713, 'product_id': 'BTC-USD', 'sequence': 6254273323, 'time': '2018-07-05T22:36:30.823000Z'}\n {'type': 'heartbeat', 'last_trade_id': 45950714, 'product_id': 'BTC-USD', 'sequence': 6254273420, 'time': '2018-07-05T22:36:31.823000Z'}\n {'type': 'heartbeat', 'last_trade_id': 45950715, 'product_id': 'BTC-USD', 'sequence': 6254273528, 'time': '2018-07-05T22:36:32.823000Z'}\n {'type': 'heartbeat', 'last_trade_id': 45950715, 'product_id': 'BTC-USD', 'sequence': 6254273641, 'time': '2018-07-05T22:36:33.823000Z'}\n {'type': 'heartbeat', 'last_trade_id': 45950715, 'product_id': 'BTC-USD', 'sequence': 6254273758, 'time': '2018-07-05T22:36:34.823000Z'}\n {'type': 'heartbeat', 'last_trade_id': 45950720, 'product_id': 'BTC-USD', 'sequence': 6254273910, 'time': '2018-07-05T22:36:35.824000Z'}\n .\n .\n .\n\nA Coinbase Pro API key allows ``copra.websocket.Client`` to authenticate with the Coinbase WebSocket server giving you access to feeds specific to your user account.\n\n.. code:: python\n\n # user_channel.py\n\n import asyncio\n\n from copra.websocket import Channel, Client\n\n KEY = YOUR_API_KEY\n SECRET = YOUR_API_SECRET\n PASSPHRASE = YOUR_API_PASSPHRASE\n\n loop = asyncio.get_event_loop()\n\n channel = Channel('user', 'LTC-USD')\n\n ws = Client(loop, channel, auth=True, key=KEY, secret=SECRET, passphrase=PASSPHRASE)\n\n try:\n loop.run_forever()\n except KeyboardInterrupt:\n loop.run_until_complete(ws.close())\n loop.close()\n\n\nRunning the above:\n\n.. code:: bash\n\n $ python3 user_channel.py\n {'type': 'subscriptions', 'channels': [{'name': 'user', 'product_ids': ['LTC-USD']}]}\n {'type': 'received', 'order_id': '42d2677d-0d37-435f-a776-e9e7f81ff22b', 'order_type': 'limit', 'size': '50.00000000', 'price': '1.00000000', 'side': 'buy', 'client_oid': '00098b59-4ac9-4ff8-ba16-bd2ef673f7b7', 'product_id': 'LTC-USD', 'sequence': 2311323871, 'user_id': '642394321fdf8242c4006432', 'profile_id': '039ee148-d490-44f9-9aed-0d1f6412884', 'time': '2018-07-07T17:33:29.755000Z'}\n {'type': 'open', 'side': 'buy', 'price': '1.00000000', 'order_id': '42d2677d-0d37-435f-a776-e9e7f81ff22b', 'remaining_size': '50.00000000', 'product_id': 'LTC-USD', 'sequence': 2311323872, 'user_id': '642394321fdf8242c4006432', 'profile_id': '039ee148-d490-44f9-9aed-0d1f6412884', 'time': '2018-07-07T17:33:29.755000Z'}\n .\n .\n .\n\nVersioning\n----------\n\nWe use `SemVer `__ for versioning. For the versions available, see the `tags on this repository `__.\n\n\nLicense\n-------\n\nThis project is licensed under the **MIT License** - see the `LICENSE file `_ for details\n\n\nAuthors\n-------\n**Tony Podlaski** - http://www.neuraldump.net \n\nSee also the list of `contributers `__ who participated in this project.\n\nContributing\n------------\nPlease read `CONTRIBUTING.rst `__ for details on our code of conduct, and the process for submitting pull requests to us.\n\n\nCredits\n-------\n\nThis package was created with `Cookiecutter `__ and the `audreyr/cookiecutter-pypackage `__ project template.\n\n\n.. |Version| image:: https://img.shields.io/pypi/v/copra.svg\n :target: https://pypi.python.org/pypi/copra\n\n.. |Build Status| image:: https://img.shields.io/travis/tpodlaski/copra.svg\n :target: https://travis-ci.org/tpodlaski/copra\n\n.. |Docs| image:: https://readthedocs.org/projects/copra/badge/?version=latest\n :target: https://copra.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n\n=======\nHistory\n=======\n\n0.1.0 (2018-07-06)\n------------------\n\n* First release on PyPI.\n\n0.2.0 (2018-07-07)\n------------------\n\n* Added Client authentication.\n\n0.3.0 (2018-07-09)\n------------------\n\n* Added reconnect option to Client.\n\n0.4.0 (2018-07-10)\n------------------\n* Added subscribe and unsubscribe methods to Client.\n\n1.0.0 (2018-07-12)\n------------------\n* Added full documentation of the CoPrA API.\n\n1.0.1 (2018-07-12)\n------------------\n* Fixed typos in the documentation.\n\n1.0.2 (2018-07-12)\n------------------\n* Added Examples page to the documentation.\n\n1.0.3 (2018-07-16)\n------------------\n* More documentation typos fixed.\n\n1.0.4 - 1.0.5 (2018-07-17)\n--------------------------\n* Non-API changes.\n\n1.0.6 (2018-08-19)\n------------------\n* Updated Autobahn requirement to 18.8.1\n\n1.0.7 (2018-08-19)\n------------------\n* Modified Travis config to test against Python 3.7.\n\n1.1.0 (2018-11-27)\n------------------\n* Added REST client.\n\n1.1.2 (2018-12-01)\n------------------\n* Updated documentation formatting.\n\n1.2.0 (2019-01-04)\n------------------\n* Created copra.rest package and moved old copra.rest module to\n copra.rest.client.\n* Created copra.websocket package and moved old copra.websocket module to\n copra.websocket.client.\n* Add imports to copra.rest.__init__ and copra.websocket.__init__ so that\n classes and attributes can still be imported as they were before.\n* Rewrote and completed unit tests from copra.websocket.\n\n1.2.5 (2019-01-05)\n------------------\n* Updated copra.websocket.client unit tests to ignore those that are \n incompatible with Python 3.5 due to Mock methods that were not yet \n implemented.\n\n1.2.6 (2019-01-07)\n------------------\n* Updated the REST client to attach an additional query string parameter \n to all GET requests. The parameter, 'no-cache', is a timestamp and ensures\n that the Coinbase server responds to all GET requests with fresh and not\n cached content.\n\n",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/tpodlaski/copra",
"keywords": "copra coinbase pro gdax api bitcoin litecoin etherium rest websocket client",
"license": "MIT license",
"maintainer": "",
"maintainer_email": "",
"name": "copra",
"package_url": "https://pypi.org/project/copra/",
"platform": "",
"project_url": "https://pypi.org/project/copra/",
"project_urls": {
"Homepage": "https://github.com/tpodlaski/copra"
},
"release_url": "https://pypi.org/project/copra/1.2.9/",
"requires_dist": [
"autobahn (>=18.8.1)",
"aiohttp (>=3.4.4)",
"python-dateutil",
"python-dotenv",
"asynctest"
],
"requires_python": "",
"summary": "Asyncronous Python REST and WebSocket Clients for the Coinbase Pro virtual currency trading platform.",
"version": "1.2.9"
},
"last_serial": 5978527,
"releases": {
"1.2.8": [
{
"comment_text": "",
"digests": {
"md5": "0127795540de927b39c525500b6ae706",
"sha256": "78eb3cb0116bbf588057757ff4d1268f0598a8ea2dd912eced729da0167a4be4"
},
"downloads": -1,
"filename": "copra-1.2.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0127795540de927b39c525500b6ae706",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 27069,
"upload_time": "2019-07-02T23:31:12",
"url": "https://files.pythonhosted.org/packages/a0/fc/478133d8c1f96022af8ab97bc0a815b2091b2ade7ea2e002019f50d838c0/copra-1.2.8-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "43130640959cf0c908ae48c09df6620f",
"sha256": "5c2927e5afc0cd2c2a25a34b54e1d3f43b3d977db48148f9f7deaf0551f71ee3"
},
"downloads": -1,
"filename": "copra-1.2.8.tar.gz",
"has_sig": false,
"md5_digest": "43130640959cf0c908ae48c09df6620f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 70712,
"upload_time": "2019-07-02T23:31:14",
"url": "https://files.pythonhosted.org/packages/d4/07/c6f6f3b967cf15f7da82d74797570a68dee41b1167d1bd33fe4ff9c07fce/copra-1.2.8.tar.gz"
}
],
"1.2.9": [
{
"comment_text": "",
"digests": {
"md5": "e44cccdc1c9e08586ec836d0707efbe6",
"sha256": "e13dbd7273c92fe25ae580556a66a4a536e00eb03204a3a7f0f7b234720cd60b"
},
"downloads": -1,
"filename": "copra-1.2.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e44cccdc1c9e08586ec836d0707efbe6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 27270,
"upload_time": "2019-10-15T17:22:07",
"url": "https://files.pythonhosted.org/packages/e3/27/1f1e3dab6e100d90a366d1c43812d52de5a09bc6a7f999159b10f2bd1819/copra-1.2.9-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "fe0c3cf54275a4136e70853ebb8cf766",
"sha256": "2ee52f5915bf7eeb0ad4a4789d4f365a821e65a2d62954107d3a43ff9dc1d035"
},
"downloads": -1,
"filename": "copra-1.2.9.tar.gz",
"has_sig": false,
"md5_digest": "fe0c3cf54275a4136e70853ebb8cf766",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 71134,
"upload_time": "2019-10-15T17:22:10",
"url": "https://files.pythonhosted.org/packages/d7/ee/9285534aaa1f16396a32c72e0228f7b8b56feb94377551febc576f9e9b97/copra-1.2.9.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "e44cccdc1c9e08586ec836d0707efbe6",
"sha256": "e13dbd7273c92fe25ae580556a66a4a536e00eb03204a3a7f0f7b234720cd60b"
},
"downloads": -1,
"filename": "copra-1.2.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e44cccdc1c9e08586ec836d0707efbe6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 27270,
"upload_time": "2019-10-15T17:22:07",
"url": "https://files.pythonhosted.org/packages/e3/27/1f1e3dab6e100d90a366d1c43812d52de5a09bc6a7f999159b10f2bd1819/copra-1.2.9-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "fe0c3cf54275a4136e70853ebb8cf766",
"sha256": "2ee52f5915bf7eeb0ad4a4789d4f365a821e65a2d62954107d3a43ff9dc1d035"
},
"downloads": -1,
"filename": "copra-1.2.9.tar.gz",
"has_sig": false,
"md5_digest": "fe0c3cf54275a4136e70853ebb8cf766",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 71134,
"upload_time": "2019-10-15T17:22:10",
"url": "https://files.pythonhosted.org/packages/d7/ee/9285534aaa1f16396a32c72e0228f7b8b56feb94377551febc576f9e9b97/copra-1.2.9.tar.gz"
}
]
}