The hyperliquid.dex.trades table combines labels and additional metadata data to provide a enriched trade details from hyperliquid.raw.trades. This contains both spot and perpetual trades on Hyperliquid DEX.
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>)
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 all trades of BTC in the last 24 hours
select
    *
from hyperliquid.dex.trades
where 1=1
    and token_a_symbol = 'BTC'
    and timestamp >= current_timestamp - interval '24 hours'

Table Columns

Column NameDescription
builderThe builder of the trade, enriched from hyperliquid.raw.builder_transactions that filters out transaction orders with builder address and fee data.
builder_nameThe name of the builder
builder_feeThe fee paid to the builder, including both buyer and seller side fee from extra_fields.
feeThe fee paid to the Hyperliquid protocol
market_typeThe type of market for the trade, e.g. spot, perpetuals
coinA unique identifier for the asset being traded: • The coin for perpetuals is the standard token symbol, e.g. HYPE • The coin for spot tokens is an ID representing a pair of tokens based on Hyperliquid’s metadata, e.g. @4 (coin) represents token 5/token 0, which corresponds to JEFF/USDC The metadata is available from the info endpoint of Hyperliquid’s API
token_a_symbolThe symbol of the first token in the trading pair
token_b_symbolThe symbol of the second token in the trading pair. At the moment, this is always USDC
amountThe quantity of token_a being traded (normalized)
priceThe execution price of token_a for the trade, in terms of token_b (usually USDC)
usd_amountThe quantity of token_a being traded, in USD terms
buyer_addressThe address of the buyer in the trade
seller_addressThe address of the seller in the trade
timestampThe UTC timestamp of when the trade was executed
transaction_hashThe transaction hash for the trade. There can be multiple trades (i.e. multiple records with different trade_id) for the same transaction_hash. *See notes for Null Transaction hash.
trade_idAn identifier for the trade. Some historical trades share a tid of 0
unique_idA unique identifier for each trade
extra_fieldsAdditional information for each trade. See notes for more details.