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.Sample Queries
Get all available trades for a given user
Table Columns
| Column Name | Description |
|---|---|
| builder | The builder of the trade, enriched from hyperliquid.raw.builder_transactions that filters out transaction orders with builder address and fee data. |
| builder_name | The name of the builder |
| builder_fee | The fee paid to the builder, including both buyer and seller side fee from extra_fields. |
| fee | The fee paid to the Hyperliquid protocol |
| market_type | The type of market for the trade, e.g. spot, perpetuals |
| coin | A 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_symbol | The symbol of the first token in the trading pair |
| token_b_symbol | The symbol of the second token in the trading pair. At the moment, this is always USDC |
| amount | The quantity of token_a being traded (normalized) |
| price | The execution price of token_a for the trade, in terms of token_b (usually USDC) |
| usd_amount | The quantity of token_a being traded, in USD terms |
| buyer_address | The address of the buyer in the trade |
| seller_address | The address of the seller in the trade |
| timestamp | The UTC timestamp of when the trade was executed |
| transaction_hash | The 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_id | An identifier for the trade. Some historical trades share a tid of 0 |
| unique_id | A unique identifier for each trade |
| extra_fields | Additional information for each trade. See notes for more details. |