{ "info": { "author": "Samuel Reed", "author_email": "sam@bitmex.com", "bugtrack_url": null, "classifiers": [], "description": "# Python Adapter for BitMEX Realtime Data\n\nThis is a reference adapter for receiving realtime data from the BitMEX API. See [the BitMEX documentation](https://testnet.bitmex.com/app/wsAPI)\nfor more information on the websocket API.\n\n# Installation\n\n`pip install bitmex-ws`\n\n# Quickstart\n\n`BitMEXWebsocket` is the main entry point to connect to the BitMEX websocket API. The API supports both authenticated\nand unauthenticated clients. Some endpoints require credentials, for more info see\n[the documentation on authentication.](https://testnet.bitmex.com/app/wsAPI#Authentication)\n\nTo get started, instantiate a connection:\n\n from bitmex_websocket import BitMEXWebsocket\n ws = BitMEXWebsocket(endpoint=\"https://testnet.bitmex.com/api/v1\", symbol=\"XBTUSD\", api_key=None, api_secret=None)\n\nIf you want to subscribe to authenticated data streams, [create an API key](https://testnet.bitmex.com/app/apiKeys) and\nsupply the corresponding values in `api_key` and `api_secret`. BitMEX has two systems - `testnet` for simulated\ntrading and testing, and `www` for live trading. API keys are specific to one system. If you created the key on testnet,\nmake sure your connection string points to testnet as well.\n\nOnce you are connected, you can retrieve data via the connector's methods. The latest data will be streamed to the\nclient - no need to poll the server.\n\n ws.get_instrument()\n ws.get_ticker()\n ws.funds()\n ws.market_depth()\n ws.open_orders()\n ws.recent_trades()\n\n`main.py` has a full example of how to connect to BitMEX:\n\n $ python main.py\n 2018-02-01 11:51:53,355 - bitmex_websocket - INFO - Connecting to wss://testnet.bitmex.com/realtime?subscribe=execution:XBTUSD,instrument: ...\n 2018-02-01 11:51:53,356 - bitmex_websocket - INFO - Not authenticating.\n 2018-02-01 11:51:54,357 - bitmex_websocket - INFO - Connected to WS.\n 2018-02-01 11:51:54,360 - bitmex_websocket - INFO - Got all market data. Starting.\n 2018-02-01 11:51:54,364 - root - INFO - Ticker: {'last': 8947.0, 'sell': 8948.0, 'buy': 8947.0, 'mid': 8947.0}\n 2018-02-01 11:51:54,369 - root - INFO - Market Depth: [{'id': 15500000950, 'side': 'Sell', 'size': 384, 'price': 999990.5, 'symbol': 'XBTUSD' ...\n 2018-02-01 11:51:54,370 - root - INFO - Recent Trades: [{'side': 'Sell', 'size': 29856, 'price': 8947, 'symbol': 'XBTUSD', 'timestamp': ...\n\n# Compatibility\nThis module supports Python 3.5+.\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "bitmex-ws-onix", "package_url": "https://pypi.org/project/bitmex-ws-onix/", "platform": "", "project_url": "https://pypi.org/project/bitmex-ws-onix/", "project_urls": null, "release_url": "https://pypi.org/project/bitmex-ws-onix/0.3.1/", "requires_dist": [ "websocket-client (==0.53.0)" ], "requires_python": "", "summary": "FoRK: Sample adapter for connecting to the BitMEX Websocket API.", "version": "0.3.1" }, "last_serial": 5002373, "releases": { "0.3.1": [ { "comment_text": "", "digests": { "md5": "67e3753611ff975b9003f362c81459ff", "sha256": "691c1899cbfa7fcefe0871a6969bf88ee20c9c238dc0a0e5a9efdba81c40442e" }, "downloads": -1, "filename": "bitmex_ws_onix-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "67e3753611ff975b9003f362c81459ff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7623, "upload_time": "2019-03-29T09:46:25", "url": "https://files.pythonhosted.org/packages/05/35/9db3d63722c8b23ec13be46b49667da04e75a63b5776f88b061aec1ff79d/bitmex_ws_onix-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f4e94818dcd0edccc3e53ec86ea75338", "sha256": "54ae4e67b8f74d17797f18a12c449425024edd06ce047a14195ada04e9f4b027" }, "downloads": -1, "filename": "bitmex-ws-onix-0.3.1.tar.gz", "has_sig": false, "md5_digest": "f4e94818dcd0edccc3e53ec86ea75338", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6586, "upload_time": "2019-03-29T09:46:28", "url": "https://files.pythonhosted.org/packages/11/de/ac216519beee91bd43b78729d8f328acdb624986649d1d9420e52a4dd9a6/bitmex-ws-onix-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "67e3753611ff975b9003f362c81459ff", "sha256": "691c1899cbfa7fcefe0871a6969bf88ee20c9c238dc0a0e5a9efdba81c40442e" }, "downloads": -1, "filename": "bitmex_ws_onix-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "67e3753611ff975b9003f362c81459ff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7623, "upload_time": "2019-03-29T09:46:25", "url": "https://files.pythonhosted.org/packages/05/35/9db3d63722c8b23ec13be46b49667da04e75a63b5776f88b061aec1ff79d/bitmex_ws_onix-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f4e94818dcd0edccc3e53ec86ea75338", "sha256": "54ae4e67b8f74d17797f18a12c449425024edd06ce047a14195ada04e9f4b027" }, "downloads": -1, "filename": "bitmex-ws-onix-0.3.1.tar.gz", "has_sig": false, "md5_digest": "f4e94818dcd0edccc3e53ec86ea75338", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6586, "upload_time": "2019-03-29T09:46:28", "url": "https://files.pythonhosted.org/packages/11/de/ac216519beee91bd43b78729d8f328acdb624986649d1d9420e52a4dd9a6/bitmex-ws-onix-0.3.1.tar.gz" } ] }