Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.allium.so/llms.txt

Use this file to discover all available pages before exploring further.

The hyperliquid.raw.fills table contains raw fill data for all trades that are executed on Hyperliquid (spot and perpetuals). To get spot pair names (e.g. HYPE/USDC), join coin to hyperliquid.raw.spot_coin_pairs on fills.coin = spot_coin_pairs.name. See Spot Coin Pairs.

Joining fills with spot coin pairs

For spot fills, coin is an identifier (e.g. @107) rather than a symbol. Join to hyperliquid.raw.spot_coin_pairs to resolve it to a pair (e.g. HYPE/USDC). Perpetual fills use the symbol directly in coin (e.g. HYPE); the join will leave pair/token columns null for those rows.

Table Columns

Column NameDescription
timestampThe UTC timestamp of the fill.
userThe user of the order that was executed.
builder_feeThe fee paid to the builder in fee_token amount.
closed_pnlThe closed PnL of the fill in USD amount.
coinThe coin of the fill. For perpetuals this is the symbol (e.g. HYPE). For spot this is an ID representing a pair (e.g. @4). Join to hyperliquid.raw.spot_coin_pairs on coin = name to get pair, token_a_symbol, token_b_symbol.
dirThe direction of the fill.
feeThe fee paid to Hyperliquid in the fee_token amount.
fee_tokenThe token of the fee.
hashThe hash of the fill.
liquidationVariant fill with liquidation details if this was a liquidation.
order_idThe order ID of the fill.
priceThe price of the fill.
sideThe side of the fill. A or B, where B = Buy, A = Ask (Sell).
sizeThe size of the fill.
start_positionThe start position of the fill.
trade_idThe trade ID of the fill.
crossedWhether the fill was crossed.
hip3_deployer_feeThe HIP-3 deployer fee in fee_token amount. Applicable for perpetual markets deployed via HIP-3.

Sample Query

SELECT
    f.timestamp,
    f.user,
    f.coin,
    p.pair,
    p.token_a_symbol,
    p.token_b_symbol,
    f.side,
    f.size,
    f.price
FROM hyperliquid.raw.fills f
LEFT JOIN hyperliquid.raw.spot_coin_pairs p ON f.coin = p.name
WHERE f.timestamp >= CURRENT_DATE - 7
ORDER BY f.timestamp DESC
LIMIT 100