oxarchive 0.5.3__py3-none-any.whl → 0.5.4__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
|
@@ -31,6 +31,7 @@ from .types import (
|
|
|
31
31
|
LighterInstrument,
|
|
32
32
|
FundingRate,
|
|
33
33
|
OpenInterest,
|
|
34
|
+
Liquidation,
|
|
34
35
|
Candle,
|
|
35
36
|
CandleInterval,
|
|
36
37
|
OxArchiveError,
|
|
@@ -67,7 +68,7 @@ except ImportError:
|
|
|
67
68
|
OxArchiveWs = None # type: ignore
|
|
68
69
|
WsOptions = None # type: ignore
|
|
69
70
|
|
|
70
|
-
__version__ = "0.5.
|
|
71
|
+
__version__ = "0.5.4"
|
|
71
72
|
|
|
72
73
|
__all__ = [
|
|
73
74
|
# Client
|
|
@@ -86,6 +87,7 @@ __all__ = [
|
|
|
86
87
|
"LighterGranularity",
|
|
87
88
|
"FundingRate",
|
|
88
89
|
"OpenInterest",
|
|
90
|
+
"Liquidation",
|
|
89
91
|
"Candle",
|
|
90
92
|
"CandleInterval",
|
|
91
93
|
"OxArchiveError",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: oxarchive
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.4
|
|
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
|
|
@@ -229,8 +229,12 @@ while result.next_cursor:
|
|
|
229
229
|
# Filter by side
|
|
230
230
|
buys = client.hyperliquid.trades.list("BTC", start=..., end=..., side="buy")
|
|
231
231
|
|
|
232
|
-
#
|
|
232
|
+
# Get recent trades (Lighter only - has real-time data)
|
|
233
|
+
recent = client.lighter.trades.recent("BTC", limit=100)
|
|
234
|
+
|
|
235
|
+
# Async versions
|
|
233
236
|
result = await client.hyperliquid.trades.alist("ETH", start=..., end=...)
|
|
237
|
+
recent = await client.lighter.trades.arecent("BTC", limit=100)
|
|
234
238
|
```
|
|
235
239
|
|
|
236
240
|
### Instruments
|
|
@@ -313,6 +317,44 @@ current = await client.hyperliquid.open_interest.acurrent("BTC")
|
|
|
313
317
|
history = await client.hyperliquid.open_interest.ahistory("ETH", start=..., end=...)
|
|
314
318
|
```
|
|
315
319
|
|
|
320
|
+
### Liquidations (Hyperliquid only)
|
|
321
|
+
|
|
322
|
+
Get historical liquidation events. Data available from May 2025 onwards.
|
|
323
|
+
|
|
324
|
+
```python
|
|
325
|
+
# Get liquidation history for a coin
|
|
326
|
+
liquidations = client.hyperliquid.liquidations.history(
|
|
327
|
+
"BTC",
|
|
328
|
+
start="2025-06-01",
|
|
329
|
+
end="2025-06-02",
|
|
330
|
+
limit=100
|
|
331
|
+
)
|
|
332
|
+
|
|
333
|
+
# Paginate through all results
|
|
334
|
+
all_liquidations = list(liquidations.data)
|
|
335
|
+
while liquidations.next_cursor:
|
|
336
|
+
liquidations = client.hyperliquid.liquidations.history(
|
|
337
|
+
"BTC",
|
|
338
|
+
start="2025-06-01",
|
|
339
|
+
end="2025-06-02",
|
|
340
|
+
cursor=liquidations.next_cursor,
|
|
341
|
+
limit=1000
|
|
342
|
+
)
|
|
343
|
+
all_liquidations.extend(liquidations.data)
|
|
344
|
+
|
|
345
|
+
# Get liquidations for a specific user
|
|
346
|
+
user_liquidations = client.hyperliquid.liquidations.by_user(
|
|
347
|
+
"0x1234...",
|
|
348
|
+
start="2025-06-01",
|
|
349
|
+
end="2025-06-07",
|
|
350
|
+
coin="BTC" # optional filter
|
|
351
|
+
)
|
|
352
|
+
|
|
353
|
+
# Async versions
|
|
354
|
+
liquidations = await client.hyperliquid.liquidations.ahistory("BTC", start=..., end=...)
|
|
355
|
+
user_liquidations = await client.hyperliquid.liquidations.aby_user("0x...", start=..., end=...)
|
|
356
|
+
```
|
|
357
|
+
|
|
316
358
|
### Candles (OHLCV)
|
|
317
359
|
|
|
318
360
|
Get historical OHLCV candle data aggregated from trades.
|
|
@@ -632,7 +674,7 @@ Full type hint support with Pydantic models:
|
|
|
632
674
|
|
|
633
675
|
```python
|
|
634
676
|
from oxarchive import Client, LighterGranularity
|
|
635
|
-
from oxarchive.types import OrderBook, Trade, Instrument, LighterInstrument, FundingRate, OpenInterest
|
|
677
|
+
from oxarchive.types import OrderBook, Trade, Instrument, LighterInstrument, FundingRate, OpenInterest, Candle, Liquidation
|
|
636
678
|
from oxarchive.resources.trades import CursorResponse
|
|
637
679
|
|
|
638
680
|
client = Client(api_key="ox_your_api_key")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
oxarchive/__init__.py,sha256
|
|
1
|
+
oxarchive/__init__.py,sha256=TUM5RDCVggBQhDMLsyj5NvCIm8Ln-eErWY2GlW8u-iA,2776
|
|
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
|
|
@@ -12,6 +12,6 @@ oxarchive/resources/liquidations.py,sha256=kX3mEX2u6uEvgk1aKfL4U0JE9gOjJOwsLVpkI
|
|
|
12
12
|
oxarchive/resources/openinterest.py,sha256=whwo60KFNLGwvVrDmDYYc-rMZr35Fcizb5Iil-DSvD8,4553
|
|
13
13
|
oxarchive/resources/orderbook.py,sha256=NzgKH45MBb2oAHyPmy6BSikaYyq0nM-8GFjur9LIRN8,6661
|
|
14
14
|
oxarchive/resources/trades.py,sha256=RhOTbhqSSBAaekden6rLY8qJL-NDArGTqCempvUbX08,5801
|
|
15
|
-
oxarchive-0.5.
|
|
16
|
-
oxarchive-0.5.
|
|
17
|
-
oxarchive-0.5.
|
|
15
|
+
oxarchive-0.5.4.dist-info/METADATA,sha256=Ctk2ZoCuaoaEA6jqEohnwJAx2jFaQpmKrNQPL8Ys2Pc,19166
|
|
16
|
+
oxarchive-0.5.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
17
|
+
oxarchive-0.5.4.dist-info/RECORD,,
|
|
File without changes
|