oxarchive 0.5.0__tar.gz → 0.5.1__tar.gz

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.
@@ -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
@@ -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
@@ -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:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "oxarchive"
7
- version = "0.5.0"
7
+ version = "0.5.1"
8
8
  description = "Official Python SDK for 0xarchive - Hyperliquid Historical Data API"
9
9
  readme = "README.md"
10
10
  license = "MIT"
File without changes
File without changes
File without changes
File without changes
File without changes