{ "info": { "author": "STEX (Stocks.Exchange)", "author_email": "analytics@stex.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# STEX (former Stocks.Exchange) (Python API client)\nSTEX (former Stocks.Exchange) provides all the core exchange functionality, and additional merchant tools available via the HTTPS API where all returned messages are in JSON. It's much easier to work with the API by using one of the clients provided by STEX, so while this page describes the API in case you want or need to build your own client, the examples use the Python client.\n## Requirements\n- Python >= 3.5\n## Dependent Libraries\n- requests\n- furl\n- pendulum\n- python-socketio\n\n## General\nThe base URL for all the requests other than public methods is \n```\nhttps://api3.stex.com\n```\n\n## Getting started\n- [Documentation](http://help.stex.com/api-integration).\n- [Sandbox API V3](https://apidocs.stex.com).\n\nTo get started with the Python API client, here's a snippet for creating a client with existing credentials:\n> In order to use the API functions, you must have an API key and API secret, which is generated in the user profile.\n\n## Lists Methods Public Example\n- [Sandbox API](https://apidocs.stex.com).\n```python\nfrom stex_client.public import Public\npublic = Public()\npublic.ping() #https://apidocs.stex.com/#/Public/get_public_ping\npublic.currencies() #https://apidocs.stex.com/#/Public/get_public_currencies\npublic.currencies_by_id(1) #https://apidocs.stex.com/#/Public/get_public_currencies__currencyId_\npublic.markets() #https://apidocs.stex.com/#/Public/get_public_markets\npublic.pairs_groups() #https://apidocs.stex.com/#/Public/get_public_pairs_groups\npublic.currency_pairs_list('BTC') #https://apidocs.stex.com/#/Public/get_public_currency_pairs_list__code_\npublic.pairs_groups_by_id(1) #https://apidocs.stex.com/#/Public/get_public_currency_pairs_group__currencyPairGroupId_\npublic.currency_pairs_by_id(1) #https://apidocs.stex.com/#/Public/get_public_currency_pairs__currencyPairId_\npublic.ticker() #https://apidocs.stex.com/#/Public/get_public_ticker\npublic.ticker_by_currency_pair_id(1) #https://apidocs.stex.com/#/Public/get_public_ticker__currencyPairId_\npublic.trades_by_currency_pair_id(1, {'limit': 1}) #https://apidocs.stex.com/#/Public/get_public_trades__currencyPairId_\npublic.orderbook_by_currency_pair_id(1, {'limit_bids': 1, 'limit_asks': 1}) #https://apidocs.stex.com/#/Public/get_public_orderbook__currencyPairId_\npublic.chart(1, '1D') #https://apidocs.stex.com/#/Public/get_public_chart__currencyPairId___candlesType_\n\n```\n\n## Lists Methods Private Example\n- [Sandbox API](https://apidocs.stex.com)\n- [How to get the settings](https://help.stex.com/articles/2740368-how-to-connect-to-the-stex-api-v3-using-postman)\n```python\nfrom stex_client.private import Private\nprivate = Private({\n 'client': {\n 'id': '',\n 'secret': ''\n },\n 'tokenObject': {\n 'access_token': '',\n 'refresh_token': '',\n },\n 'accessTokenUrl': 'https://api3.stex.com/oauth/token',\n 'scope': 'trade profile reports withdrawal',\n})\nprivate.profile_info()\nprivate.profile_wallets()\nprivate.profile_wallets_by_id(1)\nprivate.post_profile_wallets_by_currency_id(1)\nprivate.profile_deposit_address_by_wallet_id(1)\nprivate.new_deposit_address_by_wallet_id(1)\nprivate.profile_deposits({'limit': 1})\nprivate.profile_deposits_by_id(1)\nprivate.profile_withdrawals({'limit': 1})\nprivate.profile_withdrawals_id(1)\nprivate.create_withdrawal(1, 0.1, 'address', 'additional_address')\nprivate.cancel_withdrawal(1)\nprivate.reports_orders({'limit': 1})\nprivate.reports_orders_id(1)\nprivate.trading_fees_by_pair_id(1)\nprivate.trading_open_orders()\nprivate.trading_cancel_all_open_orders()\nprivate.trading_orders_by_pair_id(1)\nprivate.cancel_trading_orders_by_pair_id(1)\nprivate.create_trading_orders_by_pair_id(1, 'BUY', 1, 1)\nprivate.get_trading_orders_by_id(1)\nprivate.cancel_trading_orders_by_id(1)\n\n```\n\n## Lists Methods WebSocket Example\n- [Documentation](https://docs.google.com/document/d/1CaD7qV6UzSJ72DMY0qLHnRgabhadVV0Kxc2_lhEFWKA)\n- [How to get the settings](https://help.stex.com/articles/2740368-how-to-connect-to-the-stex-api-v3-using-postman)\n```python\nfrom stex_client.wss import WebsocketStex\nclient = WebsocketStex({\n 'client': {\n 'id': '',\n 'secret': ''\n },\n 'tokenObject': {\n 'access_token': '',\n 'refresh_token': '',\n },\n 'accessTokenUrl': 'https://api3.stex.com/oauth/token',\n 'scope': 'push',\n})\ndef show(*args):\n print(args)\n \nclient.subscribe_rate(show)\nclient.subscribe_order_fill_created(1, show)\nclient.subscribe_glass_total_changed(1, 'sell', show)\nclient.subscribe_glass_row_changed(1, 'sell', show)\nclient.subscribe_best_price_changed(1, 'bid', show)\nclient.subscribe_candle_changed(1, '1D', show)\nclient.subscribe_balance_changed(1, show)\nclient.subscribe_user_order('sell', 1, 1, show)\nclient.subscribe_user_order_deleted( 1, 1, show)\nclient.subscribe_user_order_fill( 1, 1, show)\nclient.subscribe_user_order_fill( 1, 1, show)\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/StocksExchange/python_client", "keywords": "api client request stocks.exchange stex library websocket-client stex.com", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "stex-client", "package_url": "https://pypi.org/project/stex-client/", "platform": "", "project_url": "https://pypi.org/project/stex-client/", "project_urls": { "Homepage": "https://github.com/StocksExchange/python_client" }, "release_url": "https://pypi.org/project/stex-client/1.0.6/", "requires_dist": null, "requires_python": ">=3.5", "summary": "Stex API V3 client for python.", "version": "1.0.6" }, "last_serial": 5638127, "releases": { "1.0.3": [ { "comment_text": "", "digests": { "md5": "12b7e957cedd9ca8a706528ac6d46db6", "sha256": "aa6c7c42ed51e9078159ad5cffee600705bf4f6e375833549a45c80f4255e2ce" }, "downloads": -1, "filename": "stex_client-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "12b7e957cedd9ca8a706528ac6d46db6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 7402, "upload_time": "2019-06-19T12:44:45", "url": "https://files.pythonhosted.org/packages/77/69/de7f665ee8e3b24dbaf1082c8a1a446cdf869e511592b68c92c20c77b10d/stex_client-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7936c98207044d0da5a1114dab70b6c8", "sha256": "f4a32543d2e2e444ad35aec3e7af90cf0eda0aa5cd31051e2ace9b4f108466c8" }, "downloads": -1, "filename": "stex-client-1.0.3.tar.gz", "has_sig": false, "md5_digest": "7936c98207044d0da5a1114dab70b6c8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 7664, "upload_time": "2019-06-19T12:44:47", "url": "https://files.pythonhosted.org/packages/e8/f9/11db08310f8bfec73439a6a8ac08860e6523f01339393fdd451589ff92c8/stex-client-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "87eebae79260fd5236add074346e391d", "sha256": "38bc0bba2768a388b572a89665648fcd2cf8106f922b4405932f167cfdb36dd9" }, "downloads": -1, "filename": "stex_client-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "87eebae79260fd5236add074346e391d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 8937, "upload_time": "2019-06-21T09:06:40", "url": "https://files.pythonhosted.org/packages/2b/5f/28162144558d90964554dc16f48c67a22d5c902e9496f19e6cf340d0d9fa/stex_client-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "daf64f87cbcaf5857a4045cc44b6289e", "sha256": "12fae4c99feda6c31cd48d261e813b5b1231fc9d7a665dbc3fff89c599024631" }, "downloads": -1, "filename": "stex-client-1.0.4.tar.gz", "has_sig": false, "md5_digest": "daf64f87cbcaf5857a4045cc44b6289e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 7682, "upload_time": "2019-06-21T09:06:42", "url": "https://files.pythonhosted.org/packages/9c/2e/1227f4631c50da416a7e062577be645579e13f09f32d3e11d9b5b7b4e1d8/stex-client-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "ef9239f1fe452e0bc4e5de4ff969e0c4", "sha256": "4073a90b0a727f3d41113ce822098b6df101157749118413db0737e1af45d28b" }, "downloads": -1, "filename": "stex_client-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "ef9239f1fe452e0bc4e5de4ff969e0c4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 8935, "upload_time": "2019-06-21T09:39:26", "url": "https://files.pythonhosted.org/packages/8a/6d/372f01052e05068dd2613b5dd28a751bf6998ab308db0369898d245a501c/stex_client-1.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "75d85b536e333615f3d63980f0af2015", "sha256": "53e0cafe56cd02900fc1721b54613c4077a00182fb9f94772fddeeb5f18e08bb" }, "downloads": -1, "filename": "stex-client-1.0.5.tar.gz", "has_sig": false, "md5_digest": "75d85b536e333615f3d63980f0af2015", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 7678, "upload_time": "2019-06-21T09:39:28", "url": "https://files.pythonhosted.org/packages/a7/b8/e5acc0ebecf339c54c4ff2cd6717424052ef1c0629cb7cf02f47daac799c/stex-client-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "2e643c963a980aab4a58575f3571a18a", "sha256": "18fd059280da437d99d0ea7603f4f38c5939c241a012f51c66e6384bc39a40da" }, "downloads": -1, "filename": "stex-client-1.0.6.tar.gz", "has_sig": false, "md5_digest": "2e643c963a980aab4a58575f3571a18a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 7653, "upload_time": "2019-08-06T07:52:19", "url": "https://files.pythonhosted.org/packages/36/f0/2a8ddc0aed620e11d19c195079b5c92297739a2d4dd3461edc4fb3f43582/stex-client-1.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e643c963a980aab4a58575f3571a18a", "sha256": "18fd059280da437d99d0ea7603f4f38c5939c241a012f51c66e6384bc39a40da" }, "downloads": -1, "filename": "stex-client-1.0.6.tar.gz", "has_sig": false, "md5_digest": "2e643c963a980aab4a58575f3571a18a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 7653, "upload_time": "2019-08-06T07:52:19", "url": "https://files.pythonhosted.org/packages/36/f0/2a8ddc0aed620e11d19c195079b5c92297739a2d4dd3461edc4fb3f43582/stex-client-1.0.6.tar.gz" } ] }