diff --git a/upbit/__init__.py b/upbit/__init__.py index ec48ed7..15e5afe 100644 --- a/upbit/__init__.py +++ b/upbit/__init__.py @@ -7,7 +7,7 @@ __all__ = ['client', 'websocket'] __module_name__ = 'upbit-client' -__version__ = '1.1.6.23' +__version__ = '1.1.6.24' __released_version__ = Version.get_versions(__module_name__) __latest_version__ = __released_version__[0] diff --git a/upbit/websocket.py b/upbit/websocket.py index 7062dfc..ba619be 100644 --- a/upbit/websocket.py +++ b/upbit/websocket.py @@ -11,9 +11,13 @@ class UpbitWebSocket: - def __init__(self, uri=None): + def __init__(self, uri=None, ping_inverval=None, ping_timeout=None): self.__uri = uri if uri else WEBSOCKET_URI - self.__conn = websockets.connect(self.URI) + self.__conn = websockets.connect( + uri=self.URI, + ping_interval=ping_inverval, + ping_timeout=ping_timeout + ) @property def URI(self): @@ -26,6 +30,10 @@ def URI(self, uri): @property def Connection(self): return self.__conn + + @property + def Connection(self, conn): + self.__conn = conn @staticmethod def generate_orderbook_codes(