oxarchive 0.5.3__tar.gz → 0.5.4__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.
- {oxarchive-0.5.3 → oxarchive-0.5.4}/PKG-INFO +45 -3
- {oxarchive-0.5.3 → oxarchive-0.5.4}/README.md +44 -2
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/__init__.py +3 -1
- {oxarchive-0.5.3 → oxarchive-0.5.4}/pyproject.toml +1 -1
- {oxarchive-0.5.3 → oxarchive-0.5.4}/.gitignore +0 -0
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/client.py +0 -0
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/exchanges.py +0 -0
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/http.py +0 -0
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/resources/__init__.py +0 -0
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/resources/candles.py +0 -0
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/resources/funding.py +0 -0
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/resources/instruments.py +0 -0
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/resources/liquidations.py +0 -0
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/resources/openinterest.py +0 -0
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/resources/orderbook.py +0 -0
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/resources/trades.py +0 -0
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/types.py +0 -0
- {oxarchive-0.5.3 → oxarchive-0.5.4}/oxarchive/websocket.py +0 -0
|
@@ -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")
|
|
@@ -192,8 +192,12 @@ while result.next_cursor:
|
|
|
192
192
|
# Filter by side
|
|
193
193
|
buys = client.hyperliquid.trades.list("BTC", start=..., end=..., side="buy")
|
|
194
194
|
|
|
195
|
-
#
|
|
195
|
+
# Get recent trades (Lighter only - has real-time data)
|
|
196
|
+
recent = client.lighter.trades.recent("BTC", limit=100)
|
|
197
|
+
|
|
198
|
+
# Async versions
|
|
196
199
|
result = await client.hyperliquid.trades.alist("ETH", start=..., end=...)
|
|
200
|
+
recent = await client.lighter.trades.arecent("BTC", limit=100)
|
|
197
201
|
```
|
|
198
202
|
|
|
199
203
|
### Instruments
|
|
@@ -276,6 +280,44 @@ current = await client.hyperliquid.open_interest.acurrent("BTC")
|
|
|
276
280
|
history = await client.hyperliquid.open_interest.ahistory("ETH", start=..., end=...)
|
|
277
281
|
```
|
|
278
282
|
|
|
283
|
+
### Liquidations (Hyperliquid only)
|
|
284
|
+
|
|
285
|
+
Get historical liquidation events. Data available from May 2025 onwards.
|
|
286
|
+
|
|
287
|
+
```python
|
|
288
|
+
# Get liquidation history for a coin
|
|
289
|
+
liquidations = client.hyperliquid.liquidations.history(
|
|
290
|
+
"BTC",
|
|
291
|
+
start="2025-06-01",
|
|
292
|
+
end="2025-06-02",
|
|
293
|
+
limit=100
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
# Paginate through all results
|
|
297
|
+
all_liquidations = list(liquidations.data)
|
|
298
|
+
while liquidations.next_cursor:
|
|
299
|
+
liquidations = client.hyperliquid.liquidations.history(
|
|
300
|
+
"BTC",
|
|
301
|
+
start="2025-06-01",
|
|
302
|
+
end="2025-06-02",
|
|
303
|
+
cursor=liquidations.next_cursor,
|
|
304
|
+
limit=1000
|
|
305
|
+
)
|
|
306
|
+
all_liquidations.extend(liquidations.data)
|
|
307
|
+
|
|
308
|
+
# Get liquidations for a specific user
|
|
309
|
+
user_liquidations = client.hyperliquid.liquidations.by_user(
|
|
310
|
+
"0x1234...",
|
|
311
|
+
start="2025-06-01",
|
|
312
|
+
end="2025-06-07",
|
|
313
|
+
coin="BTC" # optional filter
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
# Async versions
|
|
317
|
+
liquidations = await client.hyperliquid.liquidations.ahistory("BTC", start=..., end=...)
|
|
318
|
+
user_liquidations = await client.hyperliquid.liquidations.aby_user("0x...", start=..., end=...)
|
|
319
|
+
```
|
|
320
|
+
|
|
279
321
|
### Candles (OHLCV)
|
|
280
322
|
|
|
281
323
|
Get historical OHLCV candle data aggregated from trades.
|
|
@@ -595,7 +637,7 @@ Full type hint support with Pydantic models:
|
|
|
595
637
|
|
|
596
638
|
```python
|
|
597
639
|
from oxarchive import Client, LighterGranularity
|
|
598
|
-
from oxarchive.types import OrderBook, Trade, Instrument, LighterInstrument, FundingRate, OpenInterest
|
|
640
|
+
from oxarchive.types import OrderBook, Trade, Instrument, LighterInstrument, FundingRate, OpenInterest, Candle, Liquidation
|
|
599
641
|
from oxarchive.resources.trades import CursorResponse
|
|
600
642
|
|
|
601
643
|
client = Client(api_key="ox_your_api_key")
|
|
@@ -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",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|