Skip to main content
Schema: hypercore.core Table: ez_perp_trades Type: View

What

Perpetual futures trades enriched with market metadata from dim_perp_markets. Filters fact_trades to perp market type only (excludes spot and prelaunch). Includes leverage limits and size precision for each coin.

Key Use Cases

  • Analyzing perpetual futures trading volume and patterns
  • Calculating leverage-adjusted risk metrics
  • Tracking trader PnL and fee distribution
  • Monitoring liquidation activity by market
  • Understanding builder/MEV participation in perp markets

Important Relationships

  • Derived from core__fact_trades filtered to market_type != 'spot' and != 'prelaunch'
  • Enriched with core__dim_perp_markets via coin
  • Counterpart to core__ez_spot_trades for spot markets

Commonly-used Fields

  • All fields from core__fact_trades plus:
  • asset_index: Numeric asset index
  • size_decimals: Order size decimal precision
  • max_leverage: Maximum allowed leverage for this market

Columns

Column NameData TypeDescription
TRADE_IDNUMBERUnique trade identifier assigned by the Hyperliquid L1 matching engine.
BLOCK_NUMBERNUMBERL1 block number containing this event.
BLOCK_TIMESTAMPTIMESTAMP_NTZBlock production timestamp on the Hyperliquid L1. This is the canonical time for ordering blockchain events.
COINTEXTRaw asset identifier. Perps use plain ticker (e.g. BTC), spot uses @token_index format (e.g. @2), prelaunch uses xyz:name prefix.
SYMBOLTEXTHuman-readable trading symbol. Resolved from token metadata for spot tokens; same as coin for perps.
ASSET_INDEXNUMBERNumeric index for the asset on the Hyperliquid exchange.
SIZE_DECIMALSNUMBERDecimal precision for order sizes on this market.
MAX_LEVERAGENUMBERMaximum allowed leverage for this perpetual market.
TRADE_TIMESTAMPTIMESTAMP_NTZExact fill timestamp from the matching engine, may differ slightly from block_timestamp.
TX_HASHTEXTL1 transaction hash uniquely identifying the on-chain transaction.
PRICEFLOATExecution price in USD for this trade.
TRADE_SIZEFLOATSize of the trade in base asset units.
TRADE_NOTIONALFLOATUSD notional value of the trade (price x size), rounded to 2 decimal places.
BUYER_ADDRESSTEXTHyperCore address of the buyer in this trade.
SELLER_ADDRESSTEXTHyperCore address of the seller in this trade.
BUYER_ORDER_IDNUMBEROrder ID for the buyer’s order that was filled in this trade.
SELLER_ORDER_IDNUMBEROrder ID for the seller’s order that was filled in this trade.
BUYER_DIRTEXTBuyer’s trade direction (e.g. Open Long, Close Short).
SELLER_DIRTEXTSeller’s trade direction (e.g. Open Short, Close Long).
BUYER_CROSSEDBOOLEANWhether the buyer’s order crossed the spread (was a taker).
SELLER_CROSSEDBOOLEANWhether the seller’s order crossed the spread (was a taker).
BUYER_FEEFLOATFee charged to the buyer. Negative values indicate a maker rebate.
SELLER_FEEFLOATFee charged to the seller. Negative values indicate a maker rebate.
FEE_TOKENTEXTToken in which trading fees are denominated.
BUYER_CLOSED_PNLFLOATRealized profit/loss for the buyer if this trade closes or reduces an existing position.
SELLER_CLOSED_PNLFLOATRealized profit/loss for the seller if this trade closes or reduces an existing position.
BUYER_START_POSITIONFLOATBuyer’s position size before this trade was executed.
SELLER_START_POSITIONFLOATSeller’s position size before this trade was executed.
BUILDER_ADDRESSTEXTAddress of the block builder (MEV/builder infrastructure). NULL for most trades.
TOTAL_BUILDER_FEEFLOATCombined builder fee from both buyer and seller sides.
BUYER_TWAP_IDNUMBERTWAP order ID for the buyer. NULL if not a TWAP order.
SELLER_TWAP_IDNUMBERTWAP order ID for the seller. NULL if not a TWAP order.
BUYER_CLIENT_ORDER_IDTEXTClient-assigned order ID for the buyer’s order.
SELLER_CLIENT_ORDER_IDTEXTClient-assigned order ID for the seller’s order.
LIQUIDATED_USERTEXTAddress of the user being liquidated. NULL if this is not a liquidation trade.
LIQUIDATION_MARK_PRICEFLOATMark price at the time of liquidation. NULL if not a liquidation.
LIQUIDATION_METHODTEXTMethod used for the liquidation (e.g. backstop, market). NULL if not a liquidation.
IS_LIQUIDATIONBOOLEANBoolean indicating whether this trade is a liquidation event.
INSERTED_TIMESTAMPTIMESTAMP_NTZTimestamp when the record was inserted into this table (Snowflake SYSDATE).
MODIFIED_TIMESTAMPTIMESTAMP_NTZTimestamp when the record was last modified in this table (Snowflake SYSDATE).
EZ_PERP_TRADES_IDTEXTSurrogate key (same as fact_trades_id)
_INVOCATION_IDTEXTdbt invocation identifier for tracking which run produced this record.