hyperliquid.predictions.trades table contains every Hyperliquid HIP-4 prediction-market trade. event_name = 'Settlement' rows mark settlement events; all other rows are regular trades.
Table Details
| Property | Value |
|---|---|
| Table Name | hyperliquid.predictions.trades |
| Table Status | Beta 🌱 |
| Unique Key | transaction_hash, unique_id |
Table Columns
Identifiers
| Column Name | Data Type | Description |
|---|---|---|
| event_name | VARCHAR(16777216) | Event type: ‘Trade’ for a fill, ‘Settlement’ for a settlement event. |
| project | VARCHAR(16777216) | Top-level project namespace (hyperliquid). |
| protocol | VARCHAR(16777216) | Protocol within the project (hyperliquid_hip4). |
| chain | VARCHAR(16777216) | The blockchain network (hyperliquid). |
| exchange_type | VARCHAR(16777216) | Trade execution venue type (orderbook). |
| coin | VARCHAR(16777216) | HL-native side-token identifier (e.g. ‘#54760’). |
| encoding | NUMBER(38,0) | HL-canonical numeric encoding for the side-token. |
| outcome_id | NUMBER(38,0) | HIP-4 outcome identifier (shared by both token sides). |
| token_side | NUMBER(38,0) | Which side of the outcome’s YES/NO pair the row represents (0 or 1). |
| asset_id | NUMBER(38,0) | HL-canonical numeric identifier for the side-token. |
| maker_address | VARCHAR(16777216) | Maker (resting-order) address. NULL on synthetic mints. |
| taker_address | VARCHAR(16777216) | Taker (aggressing-order) address. |
| side_name | VARCHAR(16777216) | One of ‘BUY’, ‘SELL’, ‘SETTLE’. NULL on some synthetic-mint rows. |
| buyer_order_id | VARCHAR(16777216) | Order ID for the buyer’s order. |
| seller_order_id | VARCHAR(16777216) | Order ID for the seller’s order. |
| buyer_twap_id | VARCHAR(16777216) | TWAP order ID if the buyer’s order was a TWAP order. |
| seller_twap_id | VARCHAR(16777216) | TWAP order ID if the seller’s order was a TWAP order. |
| trade_id | VARCHAR(16777216) | The HL trade ID (tid). |
| price | NUMBER(22,10) | Trade price as a 0..1 probability. |
| size | NUMBER(22,10) | Trade size in side-tokens. |
| collateral_token | VARCHAR(16777216) | Collateral token symbol for the trade (e.g. ‘USDH’). |
| collateral_token_decimals | NUMBER(38,0) | Decimals of the collateral token. |
| collateral_amount | NUMBER(38,10) | Native-unit collateral value of the trade. |
| usd_exchange_rate | FLOAT | USD price of the collateral token. 1.0 for USDH. |
| usd_collateral_amount | FLOAT | USD value of the trade. |
| fee_token | VARCHAR(16777216) | Token in which the trade fee was paid (e.g. ‘USDH’, ‘USDC’). NULL when no fee was charged. |
| seller_fee_token | VARCHAR(16777216) | Token in which the seller’s fee was paid. HIP-4 buyer and seller can pay in different tokens. |
| buyer_fee_token | VARCHAR(16777216) | Token in which the buyer’s fee was paid. |
| buyer_fee | NUMBER(22,10) | Buyer-side fee in buyer_fee_token units. |
| seller_fee | NUMBER(22,10) | Seller-side fee in seller_fee_token units. |
| buyer_fee_usd | FLOAT | Buyer-side fee in USD. |
| seller_fee_usd | FLOAT | Seller-side fee in USD. |
| tx_fee | NUMBER(38,10) | Total fee for the transaction in native token units. |
| tx_fee_usd | FLOAT | Total fee for the transaction in USD. |
| builder_fee | NUMBER(22,10) | Total builder fee for the trade. |
| buyer_builder_fee | NUMBER(22,10) | Builder fee paid by the buyer, in buyer_fee_token units. |
| seller_builder_fee | NUMBER(22,10) | Builder fee paid by the seller, in seller_fee_token units. |
| buyer_builder_fee_usd | FLOAT | Buyer’s builder fee in USD. |
| seller_builder_fee_usd | FLOAT | Seller’s builder fee in USD. |
| buyer_builder_address | VARCHAR(16777216) | Builder address that received the buyer’s builder fee. |
| seller_builder_address | VARCHAR(16777216) | Builder address that received the seller’s builder fee. |
| buyer_dir | VARCHAR(16777216) | Direction string for the buyer leg (e.g. ‘Open Long’, ‘Settlement’). |
| seller_dir | VARCHAR(16777216) | Direction string for the seller leg. |
| is_synthetic_mint | BOOLEAN | True when the trade represents a synthetic mint, burn, or cross-coin pairing. |
| buyer_address | VARCHAR(16777216) | Buyer of the side-token. |
| seller_address | VARCHAR(16777216) | Seller of the side-token. |
| buyer_crossed | BOOLEAN | Whether the buyer’s order was the aggressor. |
| seller_crossed | BOOLEAN | Whether the seller’s order was the aggressor. |
| buyer_start_position | NUMBER(22,10) | Buyer’s position in this side-token before the trade. |
| seller_start_position | NUMBER(22,10) | Seller’s position in this side-token before the trade. |
| buyer_closed_pnl | NUMBER(22,10) | Closed PnL realized by the buyer on this fill. |
| seller_closed_pnl | NUMBER(22,10) | Closed PnL realized by the seller on this fill. |
| transaction_hash | VARCHAR(16777216) | The HL transaction hash for the fill. |
| timestamp | TIMESTAMP_NTZ(9) | UTC timestamp of the fill. |
| unique_id | VARCHAR(16777216) | Deterministic unique identifier per row. |
| _created_at | TIMESTAMP_NTZ(9) | Row creation timestamp. |
| _updated_at | TIMESTAMP_NTZ(9) | Row last update timestamp. |
Counterparties
| Column Name | Description | |
|---|---|---|
| buyer_address | Buyer of the side-token. | Address of the buyer in this NFT trade. |
| seller_address | Seller of the side-token. | Address of the seller in this NFT trade. |
| maker_address | Maker (resting-order) address. NULL on synthetic mints. | Address of the maker. I.e. users who add liquidity to the order books for NFT trades. |
| taker_address | Taker (aggressing-order) address. | Address of the taker. I.e. users who execute orders. |
| side_name | One of ‘BUY’, ‘SELL’, ‘SETTLE’. NULL on some synthetic-mint rows. | ‘BUY’ or ‘SELL’ (maker perspective). Null for FPMM. |
| buyer_dir | Direction string for the buyer leg (e.g. ‘Open Long’, ‘Settlement’). | The direction of the buyer’s trade (e.g., Open Long, Close Short). |
| seller_dir | Direction string for the seller leg. | The direction of the seller’s trade (e.g., Open Long, Close Short). |
| buyer_crossed | Whether the buyer’s order was the aggressor. | Whether the buyer’s order was crossed. |
| seller_crossed | Whether the seller’s order was the aggressor. | Whether the seller’s order was crossed. |
| buyer_order_id | Order ID for the buyer’s order. | The order ID for the buyer’s order. |
| seller_order_id | Order ID for the seller’s order. | The order ID for the seller’s order. |
| buyer_twap_id | TWAP order ID if the buyer’s order was a TWAP order. | The TWAP order ID if the buyer’s order was a TWAP order. |
| seller_twap_id | TWAP order ID if the seller’s order was a TWAP order. | The TWAP order ID if the seller’s order was a TWAP order. |
Trade Economics
| Column Name | Description | |
|---|---|---|
| price | Trade price as a 0..1 probability. | 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 | Trade size in side-tokens. | HIP-4 contract quantity. |
| collateral_token | Collateral token symbol for the trade (e.g. ‘USDH’). | HIP-4 settlement stable for the trade, derived from the fee token (settlement / synthetic-mint rows that carry no fee token inherit the day’s prevailing stable). Migrated from USDH to USDC ~2026-05-23; both peg to $1. |
| collateral_token_decimals | Decimals of the collateral token. | Number of decimals for the collateral token |
| collateral_amount | Native-unit collateral value of the trade. | Normalized collateral amount (divided by token decimals) |
| usd_exchange_rate | USD price of the collateral token. 1.0 for USDH. | 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 | USD value of the trade. | USD value of the collateral amount |
Fees
| Column Name | Description | |
|---|---|---|
| fee_token | Token in which the trade fee was paid (e.g. ‘USDH’, ‘USDC’). NULL when no fee was charged. | The token in which fees were paid. |
| seller_fee_token | Token in which the seller’s fee was paid. HIP-4 buyer and seller can pay in different tokens. | The token in which the seller paid fees. |
| buyer_fee_token | Token in which the buyer’s fee was paid. | The token in which the buyer paid fees. Often differs from seller_fee_token on spot trades. NULL on the rare fallback path where a trade lands in raw.trades but not raw.fills — i.e. the rolling 1–2 h ingestion-lag window where raw.trades arrives ahead of raw.fills. Steady-state contribution is 0 rows/day (30 d historical audit); typical in-flight cohort is a few hundred rows that drain once fills catches up. |
| buyer_fee | Buyer-side fee in buyer_fee_token units. | The fee paid by the buyer in fee_token units. |
| seller_fee | Seller-side fee in seller_fee_token units. | The fee paid by the seller in fee_token units. |
| buyer_fee_usd | Buyer-side fee in USD. | Total fee paid by the buyer in this trade, in USD. Hydrated against the buyer’s fee_token (the HIP-4 settlement stable, USDH/USDC post the ~2026-05-23 cutover). |
| seller_fee_usd | Seller-side fee in USD. | Total fee paid by the seller in this trade, in USD. Hydrated against the seller’s fee_token (the HIP-4 settlement stable, USDH/USDC post the ~2026-05-23 cutover). |
| tx_fee | Total fee for the transaction in native token units. | Total transaction fee for this trade in native token units (sum of buyer and seller fees). |
| tx_fee_usd | Total fee for the transaction in USD. | Total transaction fee for this trade in USD (sum of buyer_fee_usd and seller_fee_usd). |
| builder_fee | Total builder fee for the trade. | 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 a hydrated USD view, sum buyer_builder_fee_usd + seller_builder_fee_usd from marts_hyperliquid_predictions__trades (HIP-4) or hydrate per row via the hourly token price feed. |
| buyer_builder_fee | Builder fee paid by the buyer, in buyer_fee_token units. | Builder fee paid by the buyer, in buyer_fee_token units (NOT USD). For a hydrated USD value see buyer_builder_fee_usd. |
| seller_builder_fee | Builder fee paid by the seller, in seller_fee_token units. | Builder fee paid by the seller, in seller_fee_token units (NOT USD). For a hydrated USD value see seller_builder_fee_usd. |
| buyer_builder_fee_usd | Buyer’s builder fee in USD. | Buyer’s builder fee converted to USD by hydrating buyer_builder_fee against buyer_fee_token via the hourly DEX token-prices feed (marts_hyperliquid_dex__token_prices_hourly). Per-side hydration — HIP-4 buyer/seller can pay in different tokens. |
| seller_builder_fee_usd | Seller’s builder fee in USD. | Seller’s builder fee converted to USD by hydrating seller_builder_fee against seller_fee_token via the hourly DEX token-prices feed (marts_hyperliquid_dex__token_prices_hourly). Per-side hydration — HIP-4 buyer/seller can pay in different tokens. |
| buyer_builder_address | Builder address that received the buyer’s builder fee. | The builder address that received the buyer’s builder fee. |
| seller_builder_address | Builder address that received the seller’s builder fee. | The builder address that received the seller’s builder fee. |
Position & PnL
| Column Name | Description | |
|---|---|---|
| buyer_start_position | Buyer’s position in this side-token before the trade. | The buyer’s position before this trade. |
| seller_start_position | Seller’s position in this side-token before the trade. | The seller’s position before this trade. |
| buyer_closed_pnl | Closed PnL realized by the buyer on this fill. | The closed PnL for the buyer from this trade in USD. |
| seller_closed_pnl | Closed PnL realized by the seller on this fill. | The closed PnL for the seller from this trade in USD. |
| is_synthetic_mint | True when the trade represents a synthetic mint, burn, or cross-coin pairing. | True when the row originates from an unpaired single-side fill (synthetic mint, burn, or cross-coin pairing). |
Sample Query
SELECT
timestamp,
coin,
side_name,
size,
price,
usd_collateral_amount,
buyer_address,
seller_address
FROM hyperliquid.predictions.trades
WHERE timestamp >= CURRENT_DATE - 7
AND event_name = 'Trade'
ORDER BY timestamp DESC
LIMIT 100