oxarchive 0.5.0__py3-none-any.whl → 0.5.1__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
@@ -67,7 +67,7 @@ except ImportError:
67
67
  OxArchiveWs = None # type: ignore
68
68
  WsOptions = None # type: ignore
69
69
 
70
- __version__ = "0.5.0"
70
+ __version__ = "0.5.1"
71
71
 
72
72
  __all__ = [
73
73
  # Client
oxarchive/websocket.py CHANGED
@@ -434,6 +434,7 @@ class OxArchiveWs:
434
434
  end: Optional[int] = None,
435
435
  speed: float = 1.0,
436
436
  granularity: Optional[str] = None,
437
+ interval: Optional[str] = None,
437
438
  ) -> None:
438
439
  """Start historical replay with timing preserved.
439
440
 
@@ -444,9 +445,11 @@ class OxArchiveWs:
444
445
  end: End timestamp (Unix ms, defaults to now)
445
446
  speed: Playback speed multiplier (1 = real-time, 10 = 10x faster)
446
447
  granularity: Data resolution for Lighter orderbook ('checkpoint', '30s', '10s', '1s', 'tick')
448
+ interval: Candle interval for candles channel ('1m', '5m', '15m', '30m', '1h', '4h', '1d', '1w')
447
449
 
448
450
  Example:
449
451
  >>> await ws.replay("orderbook", "BTC", start=time.time()*1000 - 86400000, speed=10)
452
+ >>> await ws.replay("candles", "BTC", start=..., speed=10, interval="15m")
450
453
  """
451
454
  msg = {
452
455
  "op": "replay",
@@ -459,6 +462,8 @@ class OxArchiveWs:
459
462
  msg["end"] = end
460
463
  if granularity is not None:
461
464
  msg["granularity"] = granularity
465
+ if interval is not None:
466
+ msg["interval"] = interval
462
467
  await self._send(msg)
463
468
 
464
469
  async def replay_pause(self) -> None:
@@ -493,6 +498,7 @@ class OxArchiveWs:
493
498
  end: int,
494
499
  batch_size: int = 1000,
495
500
  granularity: Optional[str] = None,
501
+ interval: Optional[str] = None,
496
502
  ) -> None:
497
503
  """Start bulk streaming for fast data download.
498
504
 
@@ -503,9 +509,11 @@ class OxArchiveWs:
503
509
  end: End timestamp (Unix ms)
504
510
  batch_size: Records per batch message
505
511
  granularity: Data resolution for Lighter orderbook ('checkpoint', '30s', '10s', '1s', 'tick')
512
+ interval: Candle interval for candles channel ('1m', '5m', '15m', '30m', '1h', '4h', '1d', '1w')
506
513
 
507
514
  Example:
508
515
  >>> await ws.stream("orderbook", "ETH", start=..., end=..., batch_size=1000)
516
+ >>> await ws.stream("candles", "BTC", start=..., end=..., interval="1h")
509
517
  """
510
518
  msg = {
511
519
  "op": "stream",
@@ -517,6 +525,8 @@ class OxArchiveWs:
517
525
  }
518
526
  if granularity is not None:
519
527
  msg["granularity"] = granularity
528
+ if interval is not None:
529
+ msg["interval"] = interval
520
530
  await self._send(msg)
521
531
 
522
532
  async def stream_stop(self) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oxarchive
3
- Version: 0.5.0
3
+ Version: 0.5.1
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
@@ -1,9 +1,9 @@
1
- oxarchive/__init__.py,sha256=aBWv7E8wXOkAzpkf110EKknGLqTcUFToTzaOwoJn7fc,2738
1
+ oxarchive/__init__.py,sha256=8-68R4dD9xFfeUQ1yAuy1IadC10el1QRBNJOn3DXMfA,2738
2
2
  oxarchive/client.py,sha256=XWQ_VEBQy3UIAnmZQ-Z_FyzXnvMA3FITwtinBOf3o-Y,4453
3
3
  oxarchive/exchanges.py,sha256=ozw_eDGnzyb7D5HKMo2Hfl7-dIcVKSXJCyFlFIhiaos,2631
4
4
  oxarchive/http.py,sha256=SY_o9Ag8ADo1HI3i3uAKW1xwkYjPE75gRAjnMsddAGs,4211
5
5
  oxarchive/types.py,sha256=LX5Usgn6RgUoS6l48ufQW2zKjzH1C3xjlV5UbsEp2fY,14293
6
- oxarchive/websocket.py,sha256=sdKMJrmGeR_ApNP_c7TPJylc4DAkmrp1JXfpnRGynao,29985
6
+ oxarchive/websocket.py,sha256=sS-kLDKv2qS77-61hXChRePjL_hz-URcALM9UW5zxXU,30609
7
7
  oxarchive/resources/__init__.py,sha256=pFCP01qP6g9A9Dbzn-lGgF0i6x8GhGlwmwpOXGg3UWM,510
8
8
  oxarchive/resources/candles.py,sha256=GI7-YSNFckEd1i49W9mlrLn1cl955sY8ki0u12TuLgw,4449
9
9
  oxarchive/resources/funding.py,sha256=ybMWkpoccrkdwnd6W3oHgsaor7cBcA2nkYy4CbjmHUg,4485
@@ -11,6 +11,6 @@ oxarchive/resources/instruments.py,sha256=6q7rMdIaixXgFVXgwQsVd-YuO7RIXr1oGPT5jB
11
11
  oxarchive/resources/openinterest.py,sha256=whwo60KFNLGwvVrDmDYYc-rMZr35Fcizb5Iil-DSvD8,4553
12
12
  oxarchive/resources/orderbook.py,sha256=NzgKH45MBb2oAHyPmy6BSikaYyq0nM-8GFjur9LIRN8,6661
13
13
  oxarchive/resources/trades.py,sha256=t4iicyi1waaHzC7Q_cC-c7O4yVx1vqS4eMH8F8_5hxk,5503
14
- oxarchive-0.5.0.dist-info/METADATA,sha256=9-HN2MR1BRnmavdrtsFgC9FH_PawOysBey3YzneIzwo,17974
15
- oxarchive-0.5.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
16
- oxarchive-0.5.0.dist-info/RECORD,,
14
+ oxarchive-0.5.1.dist-info/METADATA,sha256=iR7PKuDuF89N-I5b1QqcNyZNKr-OI2tJXBirT1-tYTU,17974
15
+ oxarchive-0.5.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
16
+ oxarchive-0.5.1.dist-info/RECORD,,