diff --git a/official-ws/python/bitmex_websocket.py b/official-ws/python/bitmex_websocket.py index 9366188df..581a4bf96 100644 --- a/official-ws/python/bitmex_websocket.py +++ b/official-ws/python/bitmex_websocket.py @@ -183,7 +183,7 @@ def __send_command(self, command, args=None): args = [] self.ws.send(json.dumps({"op": command, "args": args})) - def __on_message(self, message): + def __on_message(self, ws, message): '''Handler for parsing WS messages.''' message = json.loads(message) self.logger.debug(json.dumps(message)) @@ -240,17 +240,17 @@ def __on_message(self, message): except: self.logger.error(traceback.format_exc()) - def __on_error(self, error): + def __on_error(self, ws, error): '''Called on fatal websocket errors. We exit on these.''' if not self.exited: self.logger.error("Error : %s" % error) raise websocket.WebSocketException(error) - def __on_open(self): + def __on_open(self, ws): '''Called when the WS opens.''' self.logger.debug("Websocket Opened.") - def __on_close(self): + def __on_close(self, ws, status_code, msg): '''Called on websocket close.''' self.logger.info('Websocket Closed') diff --git a/official-ws/python/setup.py b/official-ws/python/setup.py index d0b27e6b0..75c659878 100644 --- a/official-ws/python/setup.py +++ b/official-ws/python/setup.py @@ -5,14 +5,14 @@ here = dirname(__file__) setup(name='bitmex-ws', - version='0.5.0', + version='1.5.0', description='Sample adapter for connecting to the BitMEX Websocket API.', long_description=open(join(here, 'README.md')).read(), author='Samuel Reed', author_email='sam@bitmex.com', url='', install_requires=[ - 'websocket-client==0.53.0', + 'websocket-client==1.6.4', ], packages=['', 'util'], )