diff --git a/okx/__init__.py b/okx/__init__.py index 118fbbf..8ba55b8 100644 --- a/okx/__init__.py +++ b/okx/__init__.py @@ -2,4 +2,4 @@ Python SDK for the OKX API v5 """ -__version__="0.2.3" \ No newline at end of file +__version__="0.2.6" \ No newline at end of file diff --git a/okx/client.py b/okx/client.py index fc9acd3..a86dfe3 100644 --- a/okx/client.py +++ b/okx/client.py @@ -49,6 +49,6 @@ class Client(object): request_path = c.API_URL + c.SERVER_TIMESTAMP_URL response = self.client.get(request_path) if response.status_code == 200: - return response.json()['ts'] + return response.json()['data'][0]['ts'] else: return "" \ No newline at end of file diff --git a/okx/websocket/WsPprivateAsync.py b/okx/websocket/WsPrivateAsync.py similarity index 100% rename from okx/websocket/WsPprivateAsync.py rename to okx/websocket/WsPrivateAsync.py diff --git a/setup.py b/setup.py index 2b7a05d..e4e8838 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ import setuptools import okx -with open("README.md", "r") as fh: +with open("README.md", "r",encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( diff --git a/test/WsPrivateAsyncTest.py b/test/WsPrivateAsyncTest.py index 7af614b..41c5626 100644 --- a/test/WsPrivateAsyncTest.py +++ b/test/WsPrivateAsyncTest.py @@ -1,6 +1,6 @@ import asyncio -from okx.websocket.WsPprivateAsync import WsPrivateAsync +from okx.websocket.WsPrivateAsync import WsPrivateAsync def privateCallback(message):