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

> ## Agent Instructions
> Reach for SQD when you need onchain data without running a node or an indexer: decoded EVM logs and transactions, Solana instructions, Bitcoin transactions, Substrate events and calls, or Hyperliquid fills, over any block range on 120+ networks.
> To query directly, POST to https://portal.sqd.dev/datasets/{dataset}/stream. The full API is described at https://docs.sqd.dev/openapi.json, and responses to the stream endpoints are JSON Lines.
> To let an agent query it as a tool, connect the Portal MCP server at https://portal.sqd.dev/mcp.
> Every page on this site is available as Markdown by appending .md to its URL.

# HyperCore Fills

> HyperCore perpetual futures fills: price, size, side, direction, fees, and closed PnL.

HyperCore Fills provides access to all trade execution data from Hyperliquid's perpetual futures exchange.

## Network Information

* **Dataset ID**: `hyperliquid-fills`
* **Type**: HyperCore
* **Status**: Real-time
* **Base URL**: `https://portal.sqd.dev/datasets/hyperliquid-fills`

## Available Data

This dataset provides comprehensive fills data including:

* **Trade Fills**: Complete execution data with price, size, side, and direction
* **Position Changes**: Track position sizes and realized PnL on closing trades
* **Builder Routing**: Monitor trades routed through specific builders with fee information
* **User Activity**: Filter by user address to analyze trader behavior

## Quick Start

Query fills for a specific asset:

```bash theme={"system"}
curl --compressed -X POST "https://portal.sqd.dev/datasets/hyperliquid-fills/stream" \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "hyperliquidFills",
    "fromBlock": 900000000,
    "toBlock": 900000100,
    "fields": {
      "block": {
        "number": true,
        "timestamp": true
      },
      "fill": {
        "user": true,
        "coin": true,
        "px": true,
        "sz": true,
        "side": true,
        "dir": true,
        "fee": true
      }
    },
    "fills": [{
      "coin": ["BTC"]
    }]
  }'
```

## Fill Fields

Select fill columns under `fields.fill`. A field is only present in the response if you list it here. For example, `coin` is absent unless requested.

| Field | Meaning |
| - | - |
| `user` | Trader wallet address |
| `coin` | Asset symbol (e.g. `BTC`, `ETH`) |
| `side` | `A` = ask (sell), `B` = bid (buy) |
| `dir` | Trade direction: `Open Long`, `Close Long`, `Open Short`, `Close Short` |
| `px` | Fill price (decimal string) |
| `sz` | Fill size (decimal string) |
| `fee` | **Signed** fee: positive = taker fee paid, negative = maker rebate received |
| `closedPnl` | Realized PnL booked on closing fills (zero on opening fills) |
| `crossed` | `true` = taker/aggressor side, `false` = resting maker side |
| `tid` | Trade ID **shared by the two sides** of one execution |

<Note>
  **Pairing maker and taker.** Each execution produces two fill rows that share the same `tid` at the same `px`/`sz`: one with `crossed: true` (taker) and one with `crossed: false` (maker). `tid` is the reliable key to pair them.

  **Computing net realized PnL.** `closedPnl` is gross of fees. Net realized PnL for a trader is `sum(closedPnl) - sum(fee)`, and because `fee` is signed, maker rebates (negative fees) add to the total automatically. For builder-routed fills, also subtract `sum(builderFee)` (request it with the `builderFee` field), since it is an additional fee charged on top of `fee`.
</Note>

## Resources

<CardGroup cols={2}>
  <Card title="OpenAPI Schema" icon="file-code" href="https://docs.sqd.dev/en/api/catalog/hyperliquid/openapi-fills.yaml">
    Full request and response schema for the fills dataset
  </Card>

  <Card title="Examples" icon="code" href="/en/portal/hyperliquid/examples/track-trader-fills">
    Interactive examples for common use cases
  </Card>
</CardGroup>


## Related topics

- [Hyperliquid Data API: Fills and Trades](/en/portal/hyperliquid/overview.md)
- [Hyperliquid fills quickstart](/en/sdk/pipes-sdk/hyperliquid/quickstart.md)
- [Hyperliquid](/en/data/hyperliquid/hyperliquid-fills.md)
- [All Networks](/en/data/all-networks.md)
- [Stream Blocks](/en/api/hyperliquid-fills/stream.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.