Skip to main content
The hyperliquid.raw.spot_coin_pairs table maps spot pair identifiers (e.g. @107) used in raw.fills, raw.trades, raw.orders, and raw.twaps to symbol pairs (e.g. HYPE/USDC) by resolving token_a and token_b indexes via the spot tokens table.
Joining fills (and trades/orders/twaps) with spot pairs: For spot activity, join on the coin column. Use f.coin = p.name (or TRIM(f.coin) = p.name) to get pair, token_a_symbol, and token_b_symbol. For perpetuals, coin is already the symbol (e.g. HYPE); no join needed. See the Fills page for a sample query.

Table Columns

Column NameDescription
nameThe raw spot pair identifier as used in fills and trades (e.g. @107, PURR/USDC).
indexThe unique index of this spot pair on Hyperliquid.
token_a_indexThe token index of the base token (token A) in this pair.
token_b_indexThe token index of the quote token (token B) in this pair. Index 0 = USDC.
token_a_symbolThe resolved symbol of the base token (e.g. HYPE, LMTS, UBTC).
token_b_symbolThe resolved symbol of the quote token (e.g. USDC, USDH, USDT0).
pairPair as token_a_symbol/token_b_symbol (e.g. HYPE/USDC).
is_canonicalWhether this is a canonical spot pair.

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