Skip to main content
One row per leg of a perpetual fill, and one row per order-book fill. trade_amount is the size traded on a perpetual leg, and trade_amount_raw the same size as a decimal string on an order-book fill.

Columns

facts_perp_markets.trades holds one row per leg, keyed by block_timestamp, perp_market_id, trade_id, trader_address and crossed. HyperCore fills have maker and taker legs; MUX pool executions have one trader leg.
ColumnTypeDescription
block_timestampTIMESTAMPTime of the block containing the trade. Partition column.
block_numberINT64Number of the block containing the trade.
trade_idINT64Fill identifier shared by both HyperCore legs; fingerprint of chain, transaction hash and log index on MUX. Part of the row key with block_timestamp, perp_market_id, trader_address and crossed.
perp_market_idSTRINGMarket the trade executed in, keyed like dimensions.perp_markets.
interface_app_idSTRINGThe builder credited for the market, read from the registry. Every fill in a market has the same value.
exchange_app_idSTRINGThe venue that executed the trade. The same fill is credited under both app columns, so group by one of them for a total.
token_idSTRINGThe market’s settlement token, keyed like dimensions.tokens. Null on MUX markets, which accept several collateral tokens.
chain_idSTRINGChain the trade executed on.
project_idSTRINGProject the exchange app belongs to.
trader_addressSTRINGAddress of the trader on this leg. Part of the row key.
sideSTRINGWhich side this leg is: B for the buyer, A for the seller.
crossedBOOLTrue on a HyperCore taker leg or a MUX pool execution; false on a HyperCore maker leg.
priceBIGNUMERICExecution price in the settlement token on HyperCore and in USD on MUX.
feeBIGNUMERICFee charged on this leg, in fee_token, before sharing. Null on MUX executions, where fees can involve several tokens.
fee_tokenSTRINGToken the fee was charged in. Null on MUX executions.
builder_feeBIGNUMERICThe front end’s share inside that fee. Null on MUX executions.
deployer_feeBIGNUMERICThe market deployer’s share inside that fee. Null on MUX executions.
trade_amountBIGNUMERICSize traded on this leg, in units of the underlying asset. Times price it is the leg’s notional in the HyperCore settlement token or in USD on MUX.

Sample queries

This table is large and split by day. Bound block_timestamp and filter chain_id on every query, or you read the whole table and the whole table is billed to you.
trade_amount is the size in whatever the market tracks and price the settlement-token price it filled at; multiply them for the leg’s notional value.