> ## Documentation Index
> Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Hyperliquid Fills Data API

> Hyperliquid fills as per-trade rows with wallet attribution and maker or taker side, trades back to April 2023, plus TP/SL and order-lifecycle routes.

On Hyperliquid, a fill is one matched execution: an order crosses the book, the venue records the price, size, side, and the wallets involved. 0xArchive has no separate fills route because every trade row already is a fill. `/v1/hyperliquid/trades/{symbol}` returns the fill-level tape with the wallet behind each execution, back to April 2023 and continuous to the current hour, more than 2 billion records.

```bash theme={"theme":"github-dark"}
curl "https://api.0xarchive.io/v1/hyperliquid/trades/BTC?limit=1" \
  -H "X-API-Key: $OXARCHIVE_API_KEY"
```

```json theme={"theme":"github-dark"}
{
  "success": true,
  "data": [
    {
      "coin": "BTC",
      "side": "B",
      "price": "63743",
      "size": "0.0002",
      "timestamp": "2026-06-04T13:53:39.609Z",
      "trade_id": 397759113671327,
      "direction": "Open Long",
      "fee": "0.005507",
      "fee_token": "USDC",
      "start_position": "0.03919",
      "crossed": true,
      "user_address": "0x1f1fab9e5fc092f02cf833fd487b64703cbf536a",
      "tx_hash": "0xcf8038aff0c5753fd0f9043cf4049502051b00958bc894117348e402afc94f2a"
    }
  ],
  "meta": { "count": 1, "next_cursor": "1780581219809_333265093496905", "request_id": "8f3d2a6c-4b1e-4e9a-9c07-5d21f0a83b64" }
}
```

<CardGroup cols={2}>
  <Card title="Trades route" icon="arrow-left-right" href="/rest-api/trades">
    Fill-level trade routes by venue family.
  </Card>

  <Card title="Hyperliquid REST" icon="chart-candlestick" href="/rest-api/hyperliquid">
    Core perp route family.
  </Card>
</CardGroup>

## What A Fill Row Carries

Each row is one execution with the context most fills APIs drop:

| Field            | What it tells you                                                          |
| ---------------- | -------------------------------------------------------------------------- |
| `side`           | `B` (buy) or `A` (sell)                                                    |
| `crossed`        | `true` if this wallet took liquidity (taker), `false` if it rested (maker) |
| `fee`            | Fee paid; a negative value is a maker rebate                               |
| `user_address`   | The wallet behind the fill, where the venue reports it                     |
| `direction`      | Position effect, such as `Open Long` or `Close Short`                      |
| `closed_pnl`     | Realized PnL on a closing fill                                             |
| `start_position` | Position size before this fill                                             |
| `tx_hash`        | The chain transaction that carried the execution                           |

`maker_address`, `taker_address`, `order_id`, and `cloid` appear where applicable, so a fill can be joined back to the order that produced it. Prices, sizes, and fees are decimal strings.

## Fills Intent To Route Map

| Fill question                                                              | Route                                           |
| -------------------------------------------------------------------------- | ----------------------------------------------- |
| The fill tape for one symbol and window                                    | `/v1/hyperliquid/trades/{symbol}`               |
| TP/SL triggers before and after they fire                                  | `/v1/hyperliquid/orders/{symbol}/tpsl`          |
| The lifecycle around each fill: placed, partially filled, filled, canceled | `/v1/hyperliquid/orders/{symbol}/history`       |
| The resting orders those fills executed against                            | `/v1/hyperliquid/orderbook/{symbol}/l4/history` |

All four use the same `{success, data, meta}` envelope, cursor pagination through `meta.next_cursor`, and a `meta.request_id` per page.

## Wallet Attribution

Hyperliquid fills carry `user_address` wherever the venue reports it, so the tape answers wallet-level questions directly: what one account filled in a window, whether it made or took liquidity on each execution, and what each fill did to its position. The TP/SL and order-history routes accept a `user_address` filter, which turns one wallet's risk management and order behavior into a bounded query instead of a full-tape scan.

## TP/SL Lifecycle Around Fills

A take-profit or stop-loss rests as a trigger order until its price condition fires, and when it fires it becomes an ordinary fill. To follow that lifecycle, pair `/v1/hyperliquid/orders/{symbol}/tpsl` for the triggers with `/v1/hyperliquid/trades/{symbol}` for the resulting executions, joining on the order that placed the trigger. A trigger that never fired and one that fired are different events; the status field separates them.

## Coverage Window

Hyperliquid trade history starts April 2023 and runs continuous to the current hour. Order-level (L4) book surfaces start March 2026. Check the exact window and any gaps for your symbols on [Venue coverage](/venue-coverage) and [Data quality](/data-quality) before a backtest or export depends on the output.

## Maker And Taker Analysis

The `crossed` flag and the fee sign make maker/taker studies a column filter instead of a reconstruction job. Count taker fills against maker fills for one wallet to classify its execution style, sum signed fees to separate cost from rebate income, and use `direction` with `start_position` to tell opening flow from closing flow inside the same window. Because every row carries the same fields, the query that classifies one wallet scales to the whole tape.

## Stream Fills Live

The `trades` channel streams fills as they execute. Order events, including trigger placements and cancels, stream through `l4_orders`.

```javascript theme={"theme":"github-dark"}
ws.send(JSON.stringify({ op: "subscribe", channel: "trades", symbol: "BTC" }));
```

Connection and reconnect handling live in the [WebSocket](/websocket) tab; the [Hyperliquid WebSocket Streaming API](/hyperliquid-websocket-streaming-api) page covers live channels and historical replay on one socket.

## Next Step

Open [Trades](/rest-api/trades) for the route contract, [Hyperliquid REST](/rest-api/hyperliquid) for the core perp family, and [Hyperliquid Order Book Data API](/hyperliquid-order-book-data-api) when the job needs the book those fills executed against. For order-level depth, start with [L4 order books](/rest-api/order-books-l4).
