Skip to main content
The hyperliquid.dex.trades table provides enriched trade details for both spot and perpetual markets on Hyperliquid DEX, including HIP-3 permissionless perpetual trades.
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 user
select
    *
from hyperliquid.dex.trades
where 1=1
    and (buyer_address = <address_to_search> or seller_address = <address_to_search>)
Get monthly volume by token
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
Get all available trades for a given user
select
    *
from hyperliquid.dex.trades
where 1=1
    and (buyer_address = <address_to_search> or seller_address = <address_to_search>)
Get HIP-3 permissionless perpetual trades
select
    *
from hyperliquid.dex.trades
where is_hip3 = true
order by timestamp desc
limit 100

Table Columns

Market Information

Column NameDescription
market_typeThe type of market - ‘spot’ or ‘perpetuals’.
coinA unique identifier for the asset being traded: • The coin for perpetuals is the standard token symbol, e.g. BTC, ETH. • The coin for spot tokens is an ID representing a pair of tokens based on Hyperliquid’s metadata, e.g. @4.
token_a_symbolThe base token symbol. For perpetuals, this is the clean symbol (e.g., BTC).
token_b_symbolThe quote token symbol. For perpetuals, this is the collateral token (e.g., USDC).

HIP-3 Permissionless Perpetuals

Column NameDescription
perp_dexThe HIP-3 DEX name if this is a permissionless perpetual trade. Empty/null for native Hyperliquid perps and spot trades.
perp_market_nameThe full name of the HIP-3 DEX for permissionless perpetual trades.
perp_dex_deployerThe address of the HIP-3 DEX deployer for permissionless perpetual trades.
perp_dex_fee_recipientThe address that receives trading fees for HIP-3 DEX trades.
is_hip3Whether this trade is on a HIP-3 permissionless perpetual market (true) or native Hyperliquid market (false).

Trade Details

Column NameDescription
amountThe size/quantity of the trade in base token units.
priceThe price at which the trade was executed.
usd_amountThe total trade value in USD (amount * price).
buyer_addressThe address of the buyer.
seller_addressThe address of the seller.
timestampThe UTC timestamp when the trade was executed.
transaction_hashThe transaction hash for the trade.
trade_idA unique identifier for the trade.
unique_idA unique identifier for each trade record.

Order Information

Column NameDescription
seller_order_idThe order ID for the seller’s order.
buyer_order_idThe order ID for the buyer’s order.
seller_twap_idThe TWAP order ID if the seller’s order was a TWAP order.
buyer_twap_idThe TWAP order ID if the buyer’s order was a TWAP order.

Fees

Column NameDescription
fee_tokenThe token in which fees were paid.
seller_feeThe fee paid by the seller in fee_token units.
buyer_feeThe fee paid by the buyer in fee_token units.
builder_feeTotal builder fees paid (buyer + seller) in USD.
seller_builder_feeBuilder fee paid by the seller in USD.
seller_builder_addressThe builder address that received the seller’s builder fee.
buyer_builder_feeBuilder fee paid by the buyer in USD.
buyer_builder_addressThe builder address that received the buyer’s builder fee.

Position & PnL

Column NameDescription
seller_closed_pnlThe closed PnL for the seller from this trade in USD.
buyer_closed_pnlThe closed PnL for the buyer from this trade in USD.
seller_start_positionThe seller’s position before this trade.
buyer_start_positionThe buyer’s position before this trade.
seller_crossedWhether the seller’s order was crossed.
buyer_crossedWhether the buyer’s order was crossed.
seller_dirThe direction of the seller’s trade (e.g., Open Long, Close Short).
buyer_dirThe direction of the buyer’s trade (e.g., Open Long, Close Short).

Liquidation

Column NameDescription
liquidated_userThe address of the user being liquidated, if this trade is a liquidation.
liquidation_mark_priceThe mark price at liquidation, if this trade is a liquidation.
liquidation_methodThe liquidation method used, if this trade is a liquidation.