oxarchive 0.5.2__py3-none-any.whl → 0.5.3__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.2"
70
+ __version__ = "0.5.3"
71
71
 
72
72
  __all__ = [
73
73
  # Client
@@ -14,17 +14,17 @@ class TradesResource:
14
14
  Trades API resource.
15
15
 
16
16
  Example:
17
- >>> # Get recent trades
18
- >>> trades = client.trades.recent("BTC")
19
- >>>
20
17
  >>> # Get trade history with cursor-based pagination (recommended)
21
- >>> result = client.trades.list("BTC", start="2024-01-01", end="2024-01-02")
18
+ >>> result = client.hyperliquid.trades.list("BTC", start="2024-01-01", end="2024-01-02")
22
19
  >>> trades = result.data
23
20
  >>>
24
21
  >>> # Get all pages
25
22
  >>> while result.next_cursor:
26
- ... result = client.trades.list("BTC", start="2024-01-01", end="2024-01-02", cursor=result.next_cursor)
23
+ ... result = client.hyperliquid.trades.list("BTC", start="2024-01-01", end="2024-01-02", cursor=result.next_cursor)
27
24
  ... trades.extend(result.data)
25
+ >>>
26
+ >>> # Get recent trades (Lighter only - has real-time data)
27
+ >>> recent = client.lighter.trades.recent("BTC")
28
28
  """
29
29
 
30
30
  def __init__(self, http: HttpClient, base_path: str = "/v1"):
@@ -135,6 +135,10 @@ class TradesResource:
135
135
  """
136
136
  Get most recent trades for a coin.
137
137
 
138
+ Note: This method is only available for Lighter (client.lighter.trades.recent())
139
+ which has real-time data ingestion. Hyperliquid uses hourly backfill so this
140
+ endpoint is not available for Hyperliquid.
141
+
138
142
  Args:
139
143
  coin: The coin symbol (e.g., 'BTC', 'ETH')
140
144
  limit: Number of trades to return (default: 100)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oxarchive
3
- Version: 0.5.2
3
+ Version: 0.5.3
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
@@ -211,9 +211,6 @@ history = client.lighter.orderbook.history(
211
211
  The trades API uses cursor-based pagination for efficient retrieval of large datasets.
212
212
 
213
213
  ```python
214
- # Get recent trades
215
- recent = client.hyperliquid.trades.recent("BTC", limit=100)
216
-
217
214
  # Get trade history with cursor-based pagination
218
215
  result = client.hyperliquid.trades.list("ETH", start="2024-01-01", end="2024-01-02", limit=1000)
219
216
  trades = result.data
@@ -232,8 +229,7 @@ while result.next_cursor:
232
229
  # Filter by side
233
230
  buys = client.hyperliquid.trades.list("BTC", start=..., end=..., side="buy")
234
231
 
235
- # Async versions
236
- recent = await client.hyperliquid.trades.arecent("BTC")
232
+ # Async version
237
233
  result = await client.hyperliquid.trades.alist("ETH", start=..., end=...)
238
234
  ```
239
235
 
@@ -641,9 +637,11 @@ from oxarchive.resources.trades import CursorResponse
641
637
 
642
638
  client = Client(api_key="ox_your_api_key")
643
639
 
644
- orderbook: OrderBook = client.orderbook.get("BTC")
645
- trades: list[Trade] = client.trades.recent("BTC")
646
- result: CursorResponse = client.trades.list("BTC", start=..., end=...)
640
+ orderbook: OrderBook = client.hyperliquid.orderbook.get("BTC")
641
+ result: CursorResponse = client.hyperliquid.trades.list("BTC", start=..., end=...)
642
+
643
+ # Lighter has real-time data, so recent() is available
644
+ recent: list[Trade] = client.lighter.trades.recent("BTC")
647
645
 
648
646
  # Lighter granularity type hint
649
647
  granularity: LighterGranularity = "10s"
@@ -1,4 +1,4 @@
1
- oxarchive/__init__.py,sha256=Y9i6Ev_nR_cA1CUMTd2JXQPOBSd00LFQ41-BlR3-NsM,2738
1
+ oxarchive/__init__.py,sha256=-TIv-IqajJ0h3W4QyZsnBKb-PLc3hrRcsz54ynKA_hw,2738
2
2
  oxarchive/client.py,sha256=XWQ_VEBQy3UIAnmZQ-Z_FyzXnvMA3FITwtinBOf3o-Y,4453
3
3
  oxarchive/exchanges.py,sha256=nTd0gRrgV2wDoptWWxwh38HXkCcunVNuNdNEwzNDsBM,2773
4
4
  oxarchive/http.py,sha256=SY_o9Ag8ADo1HI3i3uAKW1xwkYjPE75gRAjnMsddAGs,4211
@@ -11,7 +11,7 @@ oxarchive/resources/instruments.py,sha256=6q7rMdIaixXgFVXgwQsVd-YuO7RIXr1oGPT5jB
11
11
  oxarchive/resources/liquidations.py,sha256=kX3mEX2u6uEvgk1aKfL4U0JE9gOjJOwsLVpkIj84arE,6741
12
12
  oxarchive/resources/openinterest.py,sha256=whwo60KFNLGwvVrDmDYYc-rMZr35Fcizb5Iil-DSvD8,4553
13
13
  oxarchive/resources/orderbook.py,sha256=NzgKH45MBb2oAHyPmy6BSikaYyq0nM-8GFjur9LIRN8,6661
14
- oxarchive/resources/trades.py,sha256=t4iicyi1waaHzC7Q_cC-c7O4yVx1vqS4eMH8F8_5hxk,5503
15
- oxarchive-0.5.2.dist-info/METADATA,sha256=y29y_zkpyTPlMNSbXQsOpIuK4v1Zp8k5cYHewJlSTcg,17974
16
- oxarchive-0.5.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
17
- oxarchive-0.5.2.dist-info/RECORD,,
14
+ oxarchive/resources/trades.py,sha256=RhOTbhqSSBAaekden6rLY8qJL-NDArGTqCempvUbX08,5801
15
+ oxarchive-0.5.3.dist-info/METADATA,sha256=a134ZFK2iEmo5UPDAI2sw3ZcqpqjzVphjSKGUS2-4LA,17924
16
+ oxarchive-0.5.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
17
+ oxarchive-0.5.3.dist-info/RECORD,,