oxarchive 0.3.8__py3-none-any.whl → 0.3.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
oxarchive/__init__.py
CHANGED
oxarchive/websocket.py
CHANGED
|
@@ -31,12 +31,12 @@ from dataclasses import dataclass, field
|
|
|
31
31
|
from typing import Any, Callable, Optional, Set, Union
|
|
32
32
|
|
|
33
33
|
try:
|
|
34
|
-
import
|
|
35
|
-
from websockets.
|
|
34
|
+
from websockets.asyncio.client import connect as ws_connect, ClientConnection
|
|
35
|
+
from websockets.exceptions import ConnectionClosed
|
|
36
36
|
from websockets.protocol import State as WsState
|
|
37
37
|
except ImportError:
|
|
38
38
|
raise ImportError(
|
|
39
|
-
"WebSocket support requires the 'websockets' package. "
|
|
39
|
+
"WebSocket support requires the 'websockets' package (>=14.0). "
|
|
40
40
|
"Install with: pip install oxarchive[websocket]"
|
|
41
41
|
)
|
|
42
42
|
|
|
@@ -257,7 +257,7 @@ class OxArchiveWs:
|
|
|
257
257
|
options: WebSocket connection options
|
|
258
258
|
"""
|
|
259
259
|
self.options = options
|
|
260
|
-
self._ws: Optional[
|
|
260
|
+
self._ws: Optional[ClientConnection] = None
|
|
261
261
|
self._state: WsConnectionState = "disconnected"
|
|
262
262
|
self._subscriptions: Set[str] = set()
|
|
263
263
|
self._reconnect_attempts = 0
|
|
@@ -307,7 +307,7 @@ class OxArchiveWs:
|
|
|
307
307
|
url = f"{self.options.ws_url}?apiKey={self.options.api_key}"
|
|
308
308
|
|
|
309
309
|
try:
|
|
310
|
-
self._ws = await
|
|
310
|
+
self._ws = await ws_connect(url)
|
|
311
311
|
self._reconnect_attempts = 0
|
|
312
312
|
self._set_state("connected")
|
|
313
313
|
|
|
@@ -651,7 +651,7 @@ class OxArchiveWs:
|
|
|
651
651
|
try:
|
|
652
652
|
message = await self._ws.recv()
|
|
653
653
|
self._handle_message(message)
|
|
654
|
-
except
|
|
654
|
+
except ConnectionClosed as e:
|
|
655
655
|
logger.info(f"Connection closed: {e.code} {e.reason}")
|
|
656
656
|
if self._on_close:
|
|
657
657
|
self._on_close(e.code, e.reason)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: oxarchive
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.10
|
|
4
4
|
Summary: Official Python SDK for 0xarchive - Hyperliquid Historical Data API
|
|
5
5
|
Project-URL: Homepage, https://0xarchive.io
|
|
6
6
|
Project-URL: Documentation, https://0xarchive.io/docs/sdks
|
|
@@ -24,7 +24,7 @@ Requires-Python: >=3.9
|
|
|
24
24
|
Requires-Dist: httpx>=0.25.0
|
|
25
25
|
Requires-Dist: pydantic>=2.0.0
|
|
26
26
|
Provides-Extra: all
|
|
27
|
-
Requires-Dist: websockets>=
|
|
27
|
+
Requires-Dist: websockets>=14.0; extra == 'all'
|
|
28
28
|
Provides-Extra: dev
|
|
29
29
|
Requires-Dist: mypy>=1.9.0; extra == 'dev'
|
|
30
30
|
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
@@ -32,7 +32,7 @@ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
|
32
32
|
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
33
33
|
Requires-Dist: ruff>=0.4.0; extra == 'dev'
|
|
34
34
|
Provides-Extra: websocket
|
|
35
|
-
Requires-Dist: websockets>=
|
|
35
|
+
Requires-Dist: websockets>=14.0; extra == 'websocket'
|
|
36
36
|
Description-Content-Type: text/markdown
|
|
37
37
|
|
|
38
38
|
# oxarchive
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
oxarchive/__init__.py,sha256=
|
|
1
|
+
oxarchive/__init__.py,sha256=AQVwSQ6yMPb6Dm5mqRyLuM0gk4XvaqffLMTdUaSFhdg,2182
|
|
2
2
|
oxarchive/client.py,sha256=3P0fvOcyM5BWppkVV4054NduDHKvRg-cWeluoGymmRk,3163
|
|
3
3
|
oxarchive/http.py,sha256=SY_o9Ag8ADo1HI3i3uAKW1xwkYjPE75gRAjnMsddAGs,4211
|
|
4
4
|
oxarchive/types.py,sha256=lM3WrATnHcxGs0fLq54Lka-FTvXqiwWe2He2Qn9SrSA,10844
|
|
5
|
-
oxarchive/websocket.py,sha256=
|
|
5
|
+
oxarchive/websocket.py,sha256=MyffJxaabDBonECcJg9vF4hAQ_4thjP4DaS7MaR4uno,28381
|
|
6
6
|
oxarchive/resources/__init__.py,sha256=WQ4GYQ8p3L0D2Isk4IV4h1DRpvyZlt6tOF1t_CJr6ls,385
|
|
7
7
|
oxarchive/resources/funding.py,sha256=TXkZxodVQTVcVbzNG6SpMQAzf8AkLm2NYZJxnP4MNXw,3500
|
|
8
8
|
oxarchive/resources/instruments.py,sha256=flD1sH6x3P3CTqV1ZwkfwbranVacmhsHn5Dhr7lGQhM,1606
|
|
9
9
|
oxarchive/resources/openinterest.py,sha256=h13yLA72LpfryUf8IqF6W7uE4ObYY2Qbc-auv4LtPqc,3552
|
|
10
10
|
oxarchive/resources/orderbook.py,sha256=o_DTdpzKrZvHL9YXm8cGGUugPM8uUa6r9O_72r1ByV0,4557
|
|
11
11
|
oxarchive/resources/trades.py,sha256=XCi2rXA2hxaTt0KNlWw8f7W0hzAvNWyT7DaivMz_rHw,10012
|
|
12
|
-
oxarchive-0.3.
|
|
13
|
-
oxarchive-0.3.
|
|
14
|
-
oxarchive-0.3.
|
|
12
|
+
oxarchive-0.3.10.dist-info/METADATA,sha256=rPdO6lBAEQfApyJFllhU6vcuBEYpj7i3iLyR2-NaP9c,11071
|
|
13
|
+
oxarchive-0.3.10.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
14
|
+
oxarchive-0.3.10.dist-info/RECORD,,
|
|
File without changes
|