> ## 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.

# Trades Enriched

> Hyperliquid HIP-4 trades with attached market metadata.

The `hyperliquid.predictions.trades_enriched` table contains every Hyperliquid HIP-4 prediction-market trade with outcome, question, and market-resolution context attached on each row. Useful when you want one row per trade with everything needed to filter or label.

<Info>
  Every column from `hyperliquid.predictions.trades` is available on this table. The columns documented below are the additions beyond the base trades view.
</Info>

## Additional Columns

### Outcome metadata

| Column Name          | Description                                                                                                                                                                                                                     |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| side\_label          | Display label for this row's token\_side (e.g. 'Yes', 'No', or a categorical label).                                                                                                                                            |
| token\_name          | The fee-token symbol form (e.g. '+5476') used in `fee_token` for opens.                                                                                                                                                         |
| outcome\_name        | Outcome display name from the HL API. The literal string 'Recurring' marks HL's auto-generated price-binary outcomes.                                                                                                           |
| outcome\_description | Outcome description string. For Recurring outcomes this is a structured pipe-separated payload (`class:...\|underlying:...\|expiry:...\|targetPrice:...\|period:...`). For named outcomes this is free-form prose.              |
| is\_recurring        | True for HL's auto-generated price-binary outcomes.                                                                                                                                                                             |
| class                | The market class for Recurring outcomes (e.g. 'priceBinary'). NULL for non-Recurring outcomes.                                                                                                                                  |
| underlying           | The asset whose price the outcome resolves against (e.g. 'HYPE', 'BTC'). NULL for non-Recurring outcomes.                                                                                                                       |
| target\_price        | The target price for Recurring outcomes. Stored as VARCHAR. token\_side=0 resolves YES iff underlying price >= target\_price at expiry; token\_side=1 resolves YES iff price \< target\_price. NULL for non-Recurring outcomes. |
| period               | The recurrence cadence (e.g. '15m', '1h', '1d'). NULL for non-Recurring outcomes.                                                                                                                                               |
| expiry\_ts           | Resolution timestamp (UTC). NULL for non-Recurring outcomes.                                                                                                                                                                    |

### Question metadata

| Column Name           | Description                                                            |
| --------------------- | ---------------------------------------------------------------------- |
| question\_id          | Parent question ID. NULL for Recurring / orphan outcomes.              |
| question\_name        | Question name from the HL API.                                         |
| question\_description | Question description from the HL API.                                  |
| is\_named             | True when this outcome is one of the parent question's named outcomes. |
| is\_fallback          | True when this outcome is the parent question's fallback outcome.      |

### Resolution & Settlement

| Column Name         | Description                                                           |
| ------------------- | --------------------------------------------------------------------- |
| is\_winner          | True for the winning side of a settled outcome. NULL while unsettled. |
| is\_settled         | True once the outcome has been resolved on-chain.                     |
| settled\_at         | Settlement timestamp (UTC). NULL while unsettled.                     |
| resolution\_outcome | The winning side\_label when `is_settled`.                            |

### Market metadata

| Column Name    | Description                                                                            |
| -------------- | -------------------------------------------------------------------------------------- |
| market\_title  | Human-readable market title; never null.                                               |
| category       | Market type. One of 'price\_binary', 'categorical', 'binary'.                          |
| sub\_category  | Underlying asset for Recurring outcomes (e.g. 'BTC'). NULL otherwise.                  |
| market\_status | One of 'active' (open), 'closed' (expired, awaiting settlement), 'settled' (resolved). |
| active         | True when the market is currently open for trading.                                    |
| closed         | True when the market is no longer accepting new trades.                                |

For all base trade columns (price, size, fees, counterparties, PnL, etc.) see [Trades](/historical-data/supported-blockchains/hyperliquid/predictions/trades).

## Sample Query

```sql theme={null}
SELECT
  timestamp,
  market_title,
  side_label,
  size,
  price,
  usd_collateral_amount,
  buyer_address,
  seller_address
FROM hyperliquid.predictions.trades_enriched
WHERE timestamp >= CURRENT_DATE - 7
ORDER BY timestamp DESC
LIMIT 100
```
