hyperliquid.dex.trades table provides enriched trade details for both spot and perpetual markets on Hyperliquid DEX, including HIP-3 permissionless perpetual trades.
Table Details
| Property | Value |
|---|---|
| Table Name | hyperliquid.dex.trades |
| Table Status | Production-Ready |
| Unique Key | unique_id |
Note that not all trades with builder fees will have a corresponding builder address. These are trade fills that do not have a corresponding
raw.transactions record that will indicate the builder address. Currently, about ~80-90% of all trades with builder fees will have a corresponding builder address.On Hyperliquid DEX Trades:
Hyperliquid DEX Trades are fully backfilled for every address, except for ~4,000 traders (~1% of traders) who had made more than 10k trades at the time of backfill in March 2025. This is because the Hyperliquid API only makes the last 10k trades available, and there are no other ways to retrieve the missing historical data. This means the following data is available:
- pre-March 2025: all trades are available for all addresses, except for ~4,000 traders, where only the last 10k trades are available
- March 2025 onwards: all trades are available for all addresses
Sample Queries
Get all available trades for a given userselect
*
from hyperliquid.dex.trades
where 1=1
and (buyer_address = <address_to_search> or seller_address = <address_to_search>)

select
date_trunc('month', timestamp) as month,
token_a_symbol,
sum(usd_amount) as volume_usd
from hyperliquid.dex.trades
where timestamp >= current_date - 90
group by all
select
*
from hyperliquid.dex.trades
where 1=1
and (buyer_address = <address_to_search> or seller_address = <address_to_search>)
select
*
from hyperliquid.dex.trades
where is_hip3 = true
order by timestamp desc
limit 100
Table Columns
Market Information
| Column Name | Data Type | Description |
|---|---|---|
| market_type | VARCHAR(16777216) | The type of market - ‘spot’ or ‘perpetuals’. |
| coin | VARCHAR(16777216) | A unique identifier for the asset being traded: for perpetuals the standard token symbol (e.g. BTC, ETH); for spot an ID representing a pair (e.g. @4). |
| token_a_symbol | VARCHAR(16777216) | The base token symbol. For perpetuals, the clean symbol (e.g. BTC). For spot, the token being bought/sold. |
| token_b_symbol | VARCHAR(16777216) | The quote token symbol. For perpetuals, the collateral token (e.g. USDC). For spot, the token used for payment. |
| pair | VARCHAR(16777216) | Trading pair: for spot, token_a_symbol/token_b_symbol (e.g. HYPE/USDC); for perpetuals, same as coin (e.g. BTC, ETH). Use for filtering (e.g. WHERE pair LIKE '%/USDC'). |
| perp_dex | VARCHAR(16777216) | The HIP-3 DEX name if this is a permissionless perpetual trade. Empty/null for native Hyperliquid perps and spot trades. |
| perp_market_name | VARCHAR(16777216) | The full name of the HIP-3 DEX for permissionless perpetual trades. |
| perp_dex_deployer | VARCHAR(16777216) | The address of the HIP-3 DEX deployer for permissionless perpetual trades. |
| perp_dex_fee_recipient | VARCHAR(16777216) | The address that receives trading fees for HIP-3 DEX trades. |
| is_hip3 | BOOLEAN | Whether this trade is on a HIP-3 permissionless perpetual market (true) or native Hyperliquid market (false). |
| api_category | VARCHAR(16777216) | HIP-3 deployer-supplied category for the market (lowercased). NULL for native main-dex perps, HIP-3 venues that have not yet annotated their markets, and spot trades. |
| category | VARCHAR(16777216) | Asset class for the perpetual market. Possible values: crypto, fx, bonds, commodities, preipo, indices, stocks, others. Populated for perpetual trades; NULL for spot trades. New values may appear as deployers introduce new markets. |
| description | VARCHAR(16777216) | Long-form description of the underlying asset for HIP-3 perpetual markets, supplied by the deployer. NULL for native main-dex perpetuals and spot trades. |
| keywords | ARRAY | Search keywords for HIP-3 perpetual markets, supplied by the deployer. Stored as an array. NULL for native main-dex perpetuals and spot trades. |
| display_name | VARCHAR(16777216) | Human-readable display name for HIP-3 perpetual markets, supplied by the deployer. NULL for native main-dex perpetuals and spot trades. |
| amount | NUMBER(22,10) | The size/quantity of the trade in base token units. |
| price | NUMBER(22,10) | The price at which the trade was executed. |
| usd_amount | NUMBER(22,10) | The total trade value in USD (amount * price). |
| buyer_address | VARCHAR(16777216) | The address of the buyer. |
| seller_address | VARCHAR(16777216) | The address of the seller. |
| timestamp | TIMESTAMP_NTZ(9) | The UTC timestamp when the trade was executed. |
| transaction_hash | VARCHAR(16777216) | The transaction hash for the trade. |
| trade_id | VARCHAR(16777216) | A unique identifier for the trade. |
| seller_order_id | VARCHAR(16777216) | The order ID for the seller’s order. |
| buyer_order_id | VARCHAR(16777216) | The order ID for the buyer’s order. |
| seller_twap_id | VARCHAR(16777216) | The TWAP order ID if the seller’s order was a TWAP order. |
| buyer_twap_id | VARCHAR(16777216) | The TWAP order ID if the buyer’s order was a TWAP order. |
| fee_token | VARCHAR(16777216) | Seller’s fee token. Kept for backwards compatibility. On spot trades the buyer and seller often pay in different tokens — use seller_fee_token and buyer_fee_token for per-side correctness. |
| 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 on a small number of trades where the buyer-side fee token is not available. |
| seller_fee | NUMBER(22,10) | The fee paid by the seller in seller_fee_token units. |
| buyer_fee | NUMBER(22,10) | The fee paid by the buyer in buyer_fee_token units. |
| seller_closed_pnl | NUMBER(22,10) | The closed PnL for the seller from this trade in USD. |
| buyer_closed_pnl | NUMBER(22,10) | The closed PnL for the buyer from this trade in USD. |
| seller_start_position | NUMBER(22,10) | The seller’s position before this trade. |
| buyer_start_position | NUMBER(22,10) | The buyer’s position before this trade. |
| seller_crossed | VARCHAR(16777216) | Whether the seller’s order was crossed. |
| buyer_crossed | VARCHAR(16777216) | Whether the buyer’s order was crossed. |
| seller_dir | VARCHAR(16777216) | The direction of the seller’s trade (e.g., Open Long, Close Short). |
| buyer_dir | VARCHAR(16777216) | The direction of the buyer’s trade (e.g., Open Long, Close Short). |
| builder_fee | NUMBER(22,10) | Total builder fees paid (buyer + seller) in USD. A side is negative when it earned a maker rebate. |
| seller_builder_fee | NUMBER(22,10) | Builder fee paid by the seller in USD. |
| seller_builder_address | VARCHAR(16777216) | The builder address that received the seller’s builder fee. |
| buyer_builder_fee | NUMBER(22,10) | Builder fee paid by the buyer in USD. |
| buyer_builder_address | VARCHAR(16777216) | The builder address that received the buyer’s builder fee. |
| hip3_deployer_fee | NUMBER(22,10) | Total HIP-3 deployer fee (buyer + seller) in fee_token units. Subset of the trading fee, not an additional charge. A side is negative when it earned a maker rebate. |
| seller_hip3_deployer_fee | NUMBER(22,10) | HIP-3 deployer fee paid by the seller in fee_token units. |
| buyer_hip3_deployer_fee | NUMBER(22,10) | HIP-3 deployer fee paid by the buyer in fee_token units. |
| liquidated_user | VARCHAR(16777216) | The address of the user being liquidated, if this trade is a liquidation. |
| liquidation_mark_price | NUMBER(22,10) | The mark price at liquidation, if this trade is a liquidation. |
| liquidation_method | VARCHAR(16777216) | The liquidation method used, if this trade is a liquidation. |
| unique_id | VARCHAR(16777216) | A unique identifier for each trade record. |
| _extra_fields | VARIANT | JSON variant with platform-specific metadata. |
| _created_at | TIMESTAMP_NTZ(9) | Timestamp when the record was first created. |
| _updated_at | TIMESTAMP_NTZ(9) | Timestamp when the record was last updated. |
HIP-3 Permissionless Perpetuals
| Column Name | Description | |
|---|---|---|
| perp_dex | The HIP-3 DEX name if this is a permissionless perpetual trade. Empty/null for native Hyperliquid perps and spot trades. | The HIP-3 DEX name if this is a permissionless perpetual trade. Empty/null for native Hyperliquid perps and spot trades. |
| perp_market_name | The full name of the HIP-3 DEX for permissionless perpetual trades. | The full name of the HIP-3 DEX for permissionless perpetual trades. |
| perp_dex_deployer | The address of the HIP-3 DEX deployer for permissionless perpetual trades. | The address of the HIP-3 DEX deployer for permissionless perpetual trades. |
| perp_dex_fee_recipient | The address that receives trading fees for HIP-3 DEX trades. | The address that receives trading fees for HIP-3 DEX trades. |
| is_hip3 | Whether this trade is on a HIP-3 permissionless perpetual market (true) or native Hyperliquid market (false). | Whether this trade is on a HIP-3 permissionless perpetual market (true) or native Hyperliquid market (false). |
Asset Classification & Metadata
| Column Name | Description | |
|---|---|---|
| api_category | HIP-3 deployer-supplied category for the market (lowercased). NULL for native main-dex perps, HIP-3 venues that have not yet annotated their markets, and spot trades. | Raw HIP-3 deployer-set category from the Hyperliquid perpConciseAnnotations API endpoint, lowercased. NULL when the API does not annotate the market — this is the case for native main-dex perps and for HIP-3 venues that have not supplied annotations (currently cash, hyna, abcd). Pure passthrough with no derivation. Use this column when you need to know what the deployer explicitly classified the market as. |
| category | Asset class for the perpetual market. Possible values: crypto, fx, bonds, commodities, preipo, indices, stocks, others. Populated for perpetual trades; NULL for spot trades. New values may appear as deployers introduce new markets. | Resolved asset class for the perpetual market. Order: api_category when present, else internal mapping keyed on base_symbol, else crypto for native main-dex perps, else others. Possible values include crypto, fx, bonds, commodities, preipo, indices, stocks, others. Deployers can introduce new values; downstream consumers should accept new labels. |
| description | Long-form description of the underlying asset for HIP-3 perpetual markets, supplied by the deployer. NULL for native main-dex perpetuals and spot trades. | Long-form description of the underlying asset for HIP-3 perpetual markets, set by the deployer. NULL for native main-dex perpetuals (the API does not annotate them). |
| keywords | Search keywords for HIP-3 perpetual markets, supplied by the deployer. Stored as an array. NULL for native main-dex perpetuals and spot trades. | Array of search keywords for HIP-3 perpetual markets, set by the deployer. NULL for native main-dex perpetuals. |
| display_name | Human-readable display name for HIP-3 perpetual markets, supplied by the deployer. NULL for native main-dex perpetuals and spot trades. | Human-readable display name for HIP-3 perpetual markets, set by the deployer. NULL for native main-dex perpetuals. |
Trade Details
| Column Name | Description | |
|---|---|---|
| amount | The size/quantity of the trade in base token units. | Token amount normalized by the token’s decimal precision (amount_raw / 10^decimals). This is the human-readable value (e.g. 1.5 USDC rather than 1500000). |
| price | The price at which the trade was executed. | Price per unit of the asset at the time of this event, in USD or in the quote token’s units depending on context. |
| usd_amount | The total trade value in USD (amount * price). | USD value of the token amount at the time of the event, computed using the hourly USD exchange rate. |
| buyer_address | The address of the buyer. | Address of the buyer in this NFT trade. |
| seller_address | The address of the seller. | Address of the seller in this NFT trade. |
| timestamp | The UTC timestamp when the trade was executed. | Timestamp (UTC) of this record. Alias for block_timestamp used in tables where the column is named timestamp rather than block_timestamp. |
| transaction_hash | The transaction hash for the trade. | Hash of the transaction that produced this record. Uniquely identifies a transaction within the blockchain. |
| trade_id | A unique identifier for the trade. | Unique identifier for the trade. |
| unique_id | A unique identifier for each trade record. | 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. |
Order Information
| Column Name | Description | |
|---|---|---|
| seller_order_id | The order ID for the seller’s order. | The order ID for the seller’s order. |
| buyer_order_id | The order ID for the buyer’s order. | The order ID for the buyer’s order. |
| seller_twap_id | The 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. |
| buyer_twap_id | The 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. |
Fees
| Column Name | Description | |
|---|---|---|
| fee_token | Seller’s fee token. Kept for backwards compatibility. On spot trades the buyer and seller often pay in different tokens — use seller_fee_token and buyer_fee_token for per-side correctness. | The token in which fees were paid. |
| seller_fee_token | The token in which the seller paid fees. | The token in which the seller paid fees. |
| buyer_fee_token | The token in which the buyer paid fees. Often differs from seller_fee_token on spot trades. May be NULL on a small number of trades where the buyer-side fee token is not available. | 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. |
| seller_fee | The fee paid by the seller in seller_fee_token units. | The fee paid by the seller in fee_token units. |
| buyer_fee | The fee paid by the buyer in buyer_fee_token units. | The fee paid by the buyer in fee_token units. |
| builder_fee | Total builder fees paid (buyer + seller) in USD. A side is negative when it earned a maker rebate. | 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. |
| seller_builder_fee | Builder fee paid by the seller in USD. | Builder fee paid by the seller, in seller_fee_token units (NOT USD). For a hydrated USD value see seller_builder_fee_usd. |
| seller_builder_address | The builder address that received the seller’s builder fee. | The builder address that received the seller’s builder fee. |
| buyer_builder_fee | Builder fee paid by the buyer in USD. | Builder fee paid by the buyer, in buyer_fee_token units (NOT USD). For a hydrated USD value see buyer_builder_fee_usd. |
| buyer_builder_address | The builder address that received the buyer’s builder fee. | The builder address that received the buyer’s builder fee. |
| hip3_deployer_fee | Total HIP-3 deployer fee (buyer + seller) in fee_token units. Subset of the trading fee, not an additional charge. A side is negative when it earned a maker rebate. | Total HIP-3 deployer fee (buyer + seller) in fee_token amount. This is a subset of the trading fee, not an additional charge. |
| seller_hip3_deployer_fee | HIP-3 deployer fee paid by the seller in fee_token units. | HIP-3 deployer fee paid by the seller in fee_token amount. |
| buyer_hip3_deployer_fee | HIP-3 deployer fee paid by the buyer in fee_token units. | HIP-3 deployer fee paid by the buyer in fee_token amount. |
Position & PnL
| Column Name | Description | |
|---|---|---|
| seller_closed_pnl | The closed PnL for the seller from this trade in USD. | The closed PnL for the seller from this trade in USD. |
| buyer_closed_pnl | The closed PnL for the buyer from this trade in USD. | The closed PnL for the buyer from this trade in USD. |
| seller_start_position | The seller’s position before this trade. | The seller’s position before this trade. |
| buyer_start_position | The buyer’s position before this trade. | The buyer’s position before this trade. |
| seller_crossed | Whether the seller’s order was crossed. | Whether the seller’s order was crossed. |
| buyer_crossed | Whether the buyer’s order was crossed. | Whether the buyer’s order was crossed. |
| seller_dir | The direction of the seller’s trade (e.g., Open Long, Close Short). | The direction of the seller’s trade (e.g., Open Long, Close Short). |
| buyer_dir | The direction of the buyer’s trade (e.g., Open Long, Close Short). | The direction of the buyer’s trade (e.g., Open Long, Close Short). |
Liquidation
| Column Name | Description | |
|---|---|---|
| liquidated_user | The address of the user being liquidated, if this trade is a liquidation. | The address of the user being liquidated, if this trade is a liquidation. |
| liquidation_mark_price | The mark price at liquidation, if this trade is a liquidation. | The mark price at liquidation, if this trade is a liquidation. |
| liquidation_method | The liquidation method used, if this trade is a liquidation. | The liquidation method used, if this trade is a liquidation. |
Metadata
| Column Name | Description | |
|---|---|---|
| _extra_fields | JSON variant with platform-specific metadata. | JSON string with platform-specific metadata. |
| _created_at | Timestamp when the record was first created. | Timestamp (UTC) when this row was first written to the Allium platform. Set once on insert and never changed. |
| _updated_at | Timestamp when the record was last updated. | Timestamp (UTC) of the most recent update to this row in the Allium platform. Advances when the row is reprocessed or enriched (e.g. USD price hydration). |