oxarchive 0.3.8__py3-none-any.whl → 0.3.9__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
@@ -57,7 +57,7 @@ except ImportError:
57
57
  OxArchiveWs = None # type: ignore
58
58
  WsOptions = None # type: ignore
59
59
 
60
- __version__ = "0.3.8"
60
+ __version__ = "0.3.9"
61
61
 
62
62
  __all__ = [
63
63
  # Client
oxarchive/websocket.py CHANGED
@@ -31,12 +31,11 @@ from dataclasses import dataclass, field
31
31
  from typing import Any, Callable, Optional, Set, Union
32
32
 
33
33
  try:
34
- import websockets
35
- from websockets.client import WebSocketClientProtocol
34
+ from websockets.asyncio.client import connect as ws_connect, ClientConnection
36
35
  from websockets.protocol import State as WsState
37
36
  except ImportError:
38
37
  raise ImportError(
39
- "WebSocket support requires the 'websockets' package. "
38
+ "WebSocket support requires the 'websockets' package (>=14.0). "
40
39
  "Install with: pip install oxarchive[websocket]"
41
40
  )
42
41
 
@@ -257,7 +256,7 @@ class OxArchiveWs:
257
256
  options: WebSocket connection options
258
257
  """
259
258
  self.options = options
260
- self._ws: Optional[WebSocketClientProtocol] = None
259
+ self._ws: Optional[ClientConnection] = None
261
260
  self._state: WsConnectionState = "disconnected"
262
261
  self._subscriptions: Set[str] = set()
263
262
  self._reconnect_attempts = 0
@@ -307,7 +306,7 @@ class OxArchiveWs:
307
306
  url = f"{self.options.ws_url}?apiKey={self.options.api_key}"
308
307
 
309
308
  try:
310
- self._ws = await websockets.connect(url)
309
+ self._ws = await ws_connect(url)
311
310
  self._reconnect_attempts = 0
312
311
  self._set_state("connected")
313
312
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oxarchive
3
- Version: 0.3.8
3
+ Version: 0.3.9
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>=12.0; extra == 'all'
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>=12.0; extra == 'websocket'
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=Oo6iTzojVHaCTY5rexUgP_nzPZYmxH664fsMb42zqqo,2181
1
+ oxarchive/__init__.py,sha256=c1JP0iZrqbnOrcTSfbMHDoojzHoDmDobFv7Mvv7qk5A,2181
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=Pd8Gn4zWByy0vrcUKl7nMich7Yb052BzSW72JBIT3dQ,28341
5
+ oxarchive/websocket.py,sha256=0w7OebFUo_4c3AnjG-9vfX9IBHKyTbvgAWUXhxFO53I,28336
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.8.dist-info/METADATA,sha256=6FlsYf9ke0sMGBlMCzEMEEcWyhKGUuLN-wxTrfmf55c,11070
13
- oxarchive-0.3.8.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
14
- oxarchive-0.3.8.dist-info/RECORD,,
12
+ oxarchive-0.3.9.dist-info/METADATA,sha256=O7olK5nYQ8HeHaxQwgvRUtayOudvTcgAYnhv1eTv-ro,11070
13
+ oxarchive-0.3.9.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
14
+ oxarchive-0.3.9.dist-info/RECORD,,