TradeXYZ historical data
TradeXYZ builder perps live under Hyperliquid HIP-3. 0xArchive archives the records needed to study those markets: trades, order books, L4 depth, order events, candles, funding, open interest, liquidations, and Parquet exports. Keep the xyz: prefix in every request, stored row, and export. 0xArchive provides historical data and replayable reads. It does not place or manage trades.
curl "https://api.0xarchive.io/v1/hyperliquid/hip3/trades/xyz:TSLA?limit=100" \
-H "X-API-Key: $OXARCHIVE_API_KEY"
The native TradeXYZ trading API is for market interaction. The 0xArchive API is for archived range queries, cursor pagination, WebSocket replay, and file export. The two surfaces answer different questions. Use the native API when an action must reach the venue. Use the archive when the same market window must be inspected, compared, replayed, or written to a research file.
Dataset map
| Dataset | Use it for | Route or export |
|---|---|---|
| Trades | Executed price, size, side, direction, and wallet-attributed flow | /v1/hyperliquid/hip3/trades/{symbol} |
| L2 order book | Aggregated price levels, spread, depth, and slippage context | /v1/hyperliquid/hip3/orderbook/{symbol} |
| L4 order book | Resting order identity, queue detail, and book reconstruction | /v1/hyperliquid/hip3/orderbook/{symbol}/l4 |
| L4 order events | Placed, canceled, triggered, and filled order lifecycle rows | /v1/hyperliquid/hip3/orders/{symbol}/history |
| Candles | OHLCV bars for interval-level context | /v1/hyperliquid/hip3/candles/{symbol} |
| Funding | Funding regime and carry context | /v1/hyperliquid/hip3/funding/{symbol} |
| Open interest | Positioning context beside price and flow | /v1/hyperliquid/hip3/openinterest/{symbol} |
| Liquidations | Completed forced executions where the selected symbol is covered | /v1/hyperliquid/hip3/liquidations/{symbol} |
| Exports | Bounded Parquet files for repeatable local analysis | Data catalog |
Coverage is specific to the route, symbol, and data type. Do not copy a start date from one dataset to another. Check the catalog and status before requesting a wider window.
Cursor through an export
One bounded request is enough to establish the namespace and response envelope. The same cursor chain can then feed a CSV or Parquet writer without changing the symbol.
import csv
import os
import requests
BASE = "https://api.0xarchive.io"
URL = f"{BASE}/v1/hyperliquid/hip3/trades/xyz:TSLA"
headers = {"X-API-Key": os.environ["OXARCHIVE_API_KEY"]}
params = {"limit": 100}
rows = []
seen_cursors = set()
request_ids = []
for _ in range(5):
response = requests.get(URL, headers=headers, params=params, timeout=30)
response.raise_for_status()
page = response.json()
rows.extend(page.get("data", []))
request_id = (page.get("meta") or {}).get("request_id")
if request_id:
request_ids.append(request_id)
cursor = (page.get("meta") or {}).get("next_cursor")
if not cursor:
break
if cursor in seen_cursors:
raise RuntimeError("cursor repeated")
seen_cursors.add(cursor)
params["cursor"] = cursor
fields = sorted({key for row in rows for key in row})
with open("xyz-tsla-trades.csv", "w", newline="", encoding="utf-8") as output:
writer = csv.DictWriter(output, fieldnames=fields)
writer.writeheader()
writer.writerows(rows)
print({"rows": len(rows), "pages": len(request_ids), "request_ids": len(request_ids)})
Namespace rules
- Keep builder symbols case-sensitive.
xyz:TSLAis not the same identifier asTSLA. - Store the prefix in partition keys, filenames, feature names, and joins.
- Use
/v1/hyperliquid/hip3/*routes for TradeXYZ data. Do not route a builder market through a core Hyperliquid path. - Check the selected symbol's data types before requesting L4, order events, or liquidations. A valid symbol can have different coverage across those families.
Research uses
- Backtesting: hold the builder symbol and UTC window constant while comparing strategy variants.
- Microstructure: join L2 depth, L4 resting orders, order events, and trades to separate displayed liquidity from executions.
- Liquidation analysis: combine completed events with trades and depth for the same symbol and window.
- Funding and open interest: add regime context without replacing the executed trade tape.
- Exports: select the route family in the catalog, preserve the namespace, and write the returned schema beside the file.
Route references
Use the HIP-3 Data API for the namespace contract and the HIP-3 REST reference for exact parameters. The trades reference, order-book reference, and TP/SL reference cover the route families used above.
For product scope, compare the Hyperliquid data API, Hyperliquid category inventory, data catalog, pricing, and status.
Launch history
TradeXYZ launched 21 HIP-3 builder markets on February 26, 2026. For a current request, keep the xyz: namespace and select the symbol from the catalog above.
