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

### Table Details

| Property | Value |
| - | - |
| Table Name | `hyperliquid.predictions.trades_enriched` |
| Table Status | Beta 🌱 |
| Unique Key | `transaction_hash`, `unique_id` |

> [!NOTE]
>
> Every column from `hyperliquid.predictions.trades` is available on this table. The columns documented below are the additions beyond the base trades view.

## 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. The literal string 'Recurring' marks HL's auto-generated price-binary outcomes. |
| outcome\_description | Outcome description as a JSON object. |
| 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. |
| question\_description | Question description as a JSON object. |
| 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. |

### Venue and titles

| Column Name | Description |
| - | - |
| venue | Venue identifier (for example `txyz`, `out`, `skew`). Null when not published. |
| quote\_token | Quote token symbol. |
| template\_id | Template identifier (for example `binaryPrice`). |
| resolved\_market\_title | Display title for the market. |
| resolved\_side\_label | Display label for this side. |
| resolved\_question\_title | Display title for the question. |
| resolved\_outcome\_name | Display name for the outcome. |

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

## Sample Query

```sql theme={null}
SELECT
  timestamp,
  venue,
  resolved_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
```

### Table Columns

| Column Name | Data Type | Description |
| - | - | - |
| event\_name | VARCHAR(16777216) | Name of the smart contract event that triggered this bridge record (e.g. `Deposit`, `Send`, `TransferInitiated`). |
| project | VARCHAR(16777216) | Business name of the protocol being used (e.g. `uniswap`, `aave`, `lido`, `paraswap`). Consistent across verticals — every table with a `project` column uses this field to identify the top-level protocol brand. |
| protocol | VARCHAR(16777216) | Specific version or variant of the protocol (e.g. `uniswap_v3`, `aave_v2`, `stargate_v2`). Qualifies the `project` field with version information. |
| chain | VARCHAR(16777216) | Slug identifying the blockchain this record belongs to (e.g. `ethereum`, `base`, `avalanche`, `solana`). In per-chain tables this is always the same value; in cross-chain tables it identifies which chain the row came from. |
| exchange\_type | VARCHAR(16777216) | Exchange type where the trade occurred. Examples include 'CTFExchange', 'NegRiskCTFExchange', 'CTFExchangeV2', 'NegRiskCTFExchangeV2', 'ComboExchange' (V3 combos), 'FPMM' |
| coin | VARCHAR(16777216) | Hyperliquid asset identifier: perpetual symbol (`BTC`), HIP-3 market (`xyz:SP500`), spot pair index (`@107`), or HIP-4 side-token (`#11070`). |
| encoding | NUMBER(38,0) | HL-canonical numeric encoding for the side-token. |
| outcome\_id | NUMBER(38,0) | HIP-4 outcome ID. Repeated across the two token\_side rows. |
| token\_side | NUMBER(38,0) | 0 or 1. Together with outcome\_id forms a unique key. |
| asset\_id | NUMBER(38,0) | Identifier for an asset. On Stellar, this is the `issuer:code` composite identifier for non-native assets. On other chains, may be a contract address or other unique key. |
| side\_label | VARCHAR(16777216) | Display label for this row's token\_side (e.g. 'Yes', 'No', or a categorical label). |
| token\_name | VARCHAR(16777216) | The fee-token symbol form (e.g. '+5476') used in `fee_token` for opens. |
| outcome\_name | VARCHAR(16777216) | Outcome display name. The literal string 'Recurring' marks HL's auto-generated price-binary outcomes. |
| outcome\_description | VARIANT | Outcome description as a JSON object. |
| is\_recurring | BOOLEAN | True for HL's auto-generated price-binary outcomes. |
| class | VARCHAR(16777216) | The market class for Recurring outcomes (e.g. 'priceBinary'). NULL for non-Recurring outcomes. |
| underlying | VARCHAR(16777216) | The asset whose price the outcome resolves against (e.g. 'HYPE', 'BTC'). NULL for non-Recurring outcomes. |
| target\_price | VARCHAR(16777216) | 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 | VARCHAR(16777216) | The recurrence cadence (e.g. '15m', '1h', '1d'). NULL for non-Recurring outcomes. |
| expiry\_ts | TIMESTAMP\_NTZ(9) | Resolution timestamp (UTC). NULL for non-Recurring outcomes. |
| question\_id | NUMBER(38,0) | Parent question ID. NULL for Recurring / orphan outcomes. |
| question\_name | VARCHAR(16777216) | Question name. |
| question\_description | VARIANT | Question description as a JSON object. |
| is\_named | BOOLEAN | True when this outcome is one of the parent question's named outcomes. |
| is\_fallback | BOOLEAN | True when this outcome is the parent question's fallback outcome. |
| is\_winner | BOOLEAN | True for the winning side of a settled outcome. NULL while unsettled. |
| is\_settled | BOOLEAN | True once the outcome has been resolved on-chain. |
| settled\_at | TIMESTAMP\_NTZ(9) | Settlement timestamp (UTC). NULL while unsettled. |
| resolution\_outcome | VARCHAR(16777216) | The winning side\_label when `is_settled`. |
| market\_title | VARCHAR(16777216) | Human-readable market title; never null. |
| category | VARCHAR(16777216) | Market type. One of 'price\_binary', 'categorical', 'binary'. |
| sub\_category | VARCHAR(16777216) | Underlying asset for Recurring outcomes (e.g. 'BTC'). NULL otherwise. |
| market\_status | VARCHAR(16777216) | One of 'active' (open), 'closed' (expired, awaiting settlement), 'settled' (resolved). |
| active | BOOLEAN | True when the market is currently open for trading. |
| closed | BOOLEAN | True when the market is no longer accepting new trades. |
| venue | VARCHAR(16777216) | Venue identifier (for example `txyz`, `out`, `skew`). Null when not published. |
| quote\_token | VARCHAR(16777216) | Quote token symbol. |
| template\_id | VARCHAR(16777216) | Template identifier (for example `binaryPrice`). |
| resolved\_market\_title | VARCHAR(16777216) | Display title for the market. |
| resolved\_side\_label | VARCHAR(16777216) | Display label for this side. |
| resolved\_question\_title | VARCHAR(16777216) | Display title for the question. |
| resolved\_outcome\_name | VARCHAR(16777216) | Display name for the outcome. |
| maker\_address | VARCHAR(16777216) | Address of the maker. I.e. users who add liquidity to the order books for NFT trades. |
| taker\_address | VARCHAR(16777216) | Address of the taker. I.e. users who execute orders. |
| side\_name | VARCHAR(16777216) | 'BUY' or 'SELL' (maker perspective). Null for FPMM. |
| buyer\_order\_id | VARCHAR(16777216) | The order ID for the buyer's order. |
| seller\_order\_id | VARCHAR(16777216) | The order ID for the seller's order. |
| buyer\_twap\_id | VARCHAR(16777216) | The TWAP order ID if the buyer's order was a TWAP order. |
| seller\_twap\_id | VARCHAR(16777216) | The TWAP order ID if the seller's order was a TWAP order. |
| trade\_id | VARCHAR(16777216) | Unique identifier for the trade. |
| price | NUMBER(22,10) | Price per unit of the asset at the time of this event, in USD or in the quote token's units depending on context. |
| size | NUMBER(22,10) | HIP-4 contract quantity. |
| collateral\_token | VARCHAR(16777216) | HIP-4 settlement stablecoin for the trade. Migrated from USDH to USDC \~2026-05-23; both peg to \$1. |
| collateral\_token\_decimals | NUMBER(38,0) | Number of decimals for the collateral token |
| collateral\_amount | NUMBER(38,10) | Normalized collateral amount (divided by token decimals) |
| usd\_exchange\_rate | FLOAT | USD price per unit of the token at the time of the event, used to compute `usd_amount`. Sourced from Allium's hourly price feed. |
| usd\_collateral\_amount | FLOAT | USD value of the collateral amount |
| fee\_token | VARCHAR(16777216) | The token in which fees were paid. |
| seller\_fee\_token | VARCHAR(16777216) | The token in which the seller paid fees. |
| buyer\_fee\_token | VARCHAR(16777216) | The token in which the buyer paid fees. Often differs from `seller_fee_token` on spot trades. May be NULL for a small number of trades from the last 1-2 hours; these fill in once the fee details are available. |
| buyer\_fee | NUMBER(22,10) | The fee paid by the buyer in fee\_token units. |
| seller\_fee | NUMBER(22,10) | The fee paid by the seller in fee\_token units. |
| buyer\_fee\_usd | FLOAT | Total fee paid by the buyer in this trade, in USD. The fee token is the HIP-4 settlement stablecoin (USDH, or USDC after the \~2026-05-23 cutover). |
| seller\_fee\_usd | FLOAT | Total fee paid by the seller in this trade, in USD. The fee token is the HIP-4 settlement stablecoin (USDH, or USDC after the \~2026-05-23 cutover). |
| tx\_fee | NUMBER(38,10) | Total transaction fee for this trade in native token units (sum of buyer and seller fees). |
| tx\_fee\_usd | FLOAT | Total transaction fee for this trade in USD (sum of buyer\_fee\_usd and seller\_fee\_usd). |
| builder\_fee | NUMBER(22,10) | Total builder fees paid on the trade (buyer + seller), in fee-token units (NOT USD). For HL native perps the fee token is USDC so the value is numerically ≈ USD; on HIP-3 non-USDC and HIP-4 markets the unit is the per-side fee token. For HIP-4 USD values use `buyer_builder_fee_usd` + `seller_builder_fee_usd` in `hyperliquid.predictions.trades`. Negative values are rebates and only occur on maker fills. |
| buyer\_builder\_fee | NUMBER(22,10) | Builder fee paid by the buyer, in `buyer_fee_token` units (NOT USD). For the USD value see `buyer_builder_fee_usd`. |
| seller\_builder\_fee | NUMBER(22,10) | Builder fee paid by the seller, in `seller_fee_token` units (NOT USD). For the USD value see `seller_builder_fee_usd`. |
| buyer\_builder\_fee\_usd | FLOAT | Buyer's builder fee in USD, valued in the buyer's fee token. HIP-4 buyer and seller can pay in different tokens. |
| seller\_builder\_fee\_usd | FLOAT | Seller's builder fee in USD, valued in the seller's fee token. HIP-4 buyer and seller can pay in different tokens. |
| buyer\_builder\_address | VARCHAR(16777216) | The builder address that received the buyer's builder fee. |
| seller\_builder\_address | VARCHAR(16777216) | The builder address that received the seller's builder fee. |
| buyer\_dir | VARCHAR(16777216) | The direction of the buyer's trade (e.g., Open Long, Close Short). |
| seller\_dir | VARCHAR(16777216) | The direction of the seller's trade (e.g., Open Long, Close Short). |
| is\_synthetic\_mint | BOOLEAN | True when the row is a synthetic mint, burn, or cross-coin pairing rather than a two-sided trade in a single side-token. |
| buyer\_address | VARCHAR(16777216) | Address of the buyer in this NFT trade. |
| seller\_address | VARCHAR(16777216) | Address of the seller in this NFT trade. |
| buyer\_crossed | BOOLEAN | Whether the buyer's order was crossed. |
| seller\_crossed | BOOLEAN | Whether the seller's order was crossed. |
| buyer\_start\_position | NUMBER(22,10) | The buyer's position before this trade. |
| seller\_start\_position | NUMBER(22,10) | The seller's position before this trade. |
| buyer\_closed\_pnl | NUMBER(22,10) | The closed PnL for the buyer from this trade in USD. |
| seller\_closed\_pnl | NUMBER(22,10) | The closed PnL for the seller from this trade in USD. |
| transaction\_hash | VARCHAR(16777216) | Hash of the transaction that produced this record. Uniquely identifies a transaction within the blockchain. |
| timestamp | TIMESTAMP\_NTZ(9) | Timestamp (UTC) of this record. Alias for block\_timestamp used in tables where the column is named `timestamp` rather than `block_timestamp`. |
| unique\_id | VARCHAR(16777216) | Allium's deterministic unique identifier for this row. Generated from the fields that uniquely identify the record (e.g. transaction hash + log index). Stable across full refreshes. |
| \_created\_at | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was created in the database. |
| \_updated\_at | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was last updated in the database. |
