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.
The 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 Columns
Identifiers
| Column Name | Description |
|---|
| event_name | One of ‘Trade’ or ‘Settlement’. |
| project | Always ‘hyperliquid’. |
| protocol | Always ‘hyperliquid_hip4’. |
| chain | Always ‘hyperliquid’. |
| exchange_type | Always ‘orderbook’. |
| coin | HL-native side-token identifier (e.g. ‘#54760’). |
| encoding | HL-canonical numeric encoding for the side-token. |
| outcome_id | HIP-4 outcome ID. |
| token_side | 0 or 1. |
| asset_id | HL-canonical numeric identifier for the side-token. |
| trade_id | The HL trade ID (tid). |
| transaction_hash | The HL transaction hash for the fill. |
| timestamp | UTC timestamp of the fill. |
| unique_id | Deterministic unique identifier per row. |
| _created_at | Row creation timestamp. |
| _updated_at | Row last update timestamp. |
Counterparties
| Column Name | Description |
|---|
| buyer_address | Buyer of the side-token. |
| seller_address | Seller of the side-token. |
| maker_address | Maker (resting-order) address. NULL on synthetic mints. |
| taker_address | Taker (aggressing-order) address. |
| side_name | One of ‘BUY’, ‘SELL’, ‘SETTLE’. |
| buyer_dir | Direction string for the buyer leg (e.g. ‘Open Long’, ‘Settlement’). |
| seller_dir | Direction string for the seller leg. |
| buyer_crossed | Whether the buyer’s order was the aggressor. |
| seller_crossed | Whether the seller’s order was the aggressor. |
| buyer_order_id | Order ID for the buyer’s order. |
| seller_order_id | Order ID for the seller’s order. |
| buyer_twap_id | 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. |
Trade Economics
| Column Name | Description |
|---|
| price | Trade price as a 0..1 probability. |
| size | Trade size in side-tokens. |
| collateral_token | Collateral token symbol. Always ‘USDH’ on HIP-4 today. |
| collateral_token_decimals | Decimals of the collateral token. |
| collateral_amount | Native-unit collateral value of the trade. |
| usd_exchange_rate | USD price of the collateral token. 1.0 for USDH. |
| usd_collateral_amount | USD value of the trade. |
Fees
| Column Name | Description |
|---|
| fee_token | Token in which the fee was paid (e.g. ‘USDH’). NULL when no fee was charged. |
| buyer_fee | Buyer-side fee in fee_token units. |
| seller_fee | Seller-side fee in fee_token units. |
| buyer_fee_usd | Buyer-side fee in USD. |
| seller_fee_usd | Seller-side fee in USD. |
| tx_fee | Total fee for the transaction in fee_token units. |
| tx_fee_usd | Total fee for the transaction in USD. |
| builder_fee | Total builder fee for the trade. |
| buyer_builder_fee | Builder fee paid by the buyer. |
| seller_builder_fee | Builder fee paid by the seller. |
| buyer_builder_address | Builder address that received the buyer’s builder fee. |
| seller_builder_address | 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. |
| seller_start_position | Seller’s position in this side-token before the trade. |
| buyer_closed_pnl | Closed PnL realized by the buyer on this fill. |
| seller_closed_pnl | Closed PnL realized by the seller on this fill. |
| is_synthetic_mint | True when the trade represents a 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