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

# Fills

> Raw Hyperliquid fills data for all trades that are executed

The `hyperliquid.raw.fills` table contains raw fill data for all trades that are executed on Hyperliquid (spot and perpetuals). To get spot pair names (e.g. HYPE/USDC), join `coin` to `hyperliquid.raw.spot_coin_pairs` on `fills.coin = spot_coin_pairs.name`. See [Spot Coin Pairs](/historical-data/supported-blockchains/hyperliquid/raw/spot-coin-pairs).

## Joining fills with spot coin pairs

For **spot** fills, `coin` is an identifier (e.g. `@107`) rather than a symbol. Join to `hyperliquid.raw.spot_coin_pairs` to resolve it to a pair (e.g. HYPE/USDC). Perpetual fills use the symbol directly in `coin` (e.g. HYPE); the join will leave `pair`/token columns null for those rows.

## Table Columns

| Column Name         | Description                                                                                                                                                                                                                              |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| timestamp           | The UTC timestamp of the fill.                                                                                                                                                                                                           |
| user                | The user of the order that was executed.                                                                                                                                                                                                 |
| builder\_fee        | The fee paid to the builder in fee\_token amount.                                                                                                                                                                                        |
| closed\_pnl         | The closed PnL of the fill in USD amount.                                                                                                                                                                                                |
| coin                | The coin of the fill. For perpetuals this is the symbol (e.g. HYPE). For spot this is an ID representing a pair (e.g. @4). Join to `hyperliquid.raw.spot_coin_pairs` on `coin = name` to get `pair`, `token_a_symbol`, `token_b_symbol`. |
| dir                 | The direction of the fill.                                                                                                                                                                                                               |
| fee                 | The fee paid to Hyperliquid in the fee\_token amount.                                                                                                                                                                                    |
| fee\_token          | The token of the fee.                                                                                                                                                                                                                    |
| hash                | The hash of the fill.                                                                                                                                                                                                                    |
| liquidation         | Variant fill with liquidation details if this was a liquidation.                                                                                                                                                                         |
| order\_id           | The order ID of the fill.                                                                                                                                                                                                                |
| price               | The price of the fill.                                                                                                                                                                                                                   |
| side                | The side of the fill. A or B, where B = Buy, A = Ask (Sell).                                                                                                                                                                             |
| size                | The size of the fill.                                                                                                                                                                                                                    |
| start\_position     | The start position of the fill.                                                                                                                                                                                                          |
| trade\_id           | The trade ID of the fill.                                                                                                                                                                                                                |
| crossed             | Whether the fill was crossed.                                                                                                                                                                                                            |
| hip3\_deployer\_fee | The HIP-3 deployer fee in fee\_token amount. Applicable for perpetual markets deployed via HIP-3.                                                                                                                                        |

## Sample Query

```sql theme={null}
SELECT
    f.timestamp,
    f.user,
    f.coin,
    p.pair,
    p.token_a_symbol,
    p.token_b_symbol,
    f.side,
    f.size,
    f.price
FROM hyperliquid.raw.fills f
LEFT JOIN hyperliquid.raw.spot_coin_pairs p ON f.coin = p.name
WHERE f.timestamp >= CURRENT_DATE - 7
ORDER BY f.timestamp DESC
LIMIT 100
```
