> ## 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.

# Spot Coin Pairs

> Hyperliquid spot coin pair metadata. Maps @index identifiers to symbol pairs (e.g. HYPE/USDC).

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.

<Info>
  **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](/historical-data/supported-blockchains/hyperliquid/raw/fills) page for a sample query.
</Info>

## Table Columns

| Column Name      | Description                                                                      |
| ---------------- | -------------------------------------------------------------------------------- |
| name             | The raw spot pair identifier as used in fills and trades (e.g. @107, PURR/USDC). |
| index            | The unique index of this spot pair on Hyperliquid.                               |
| token\_a\_index  | The token index of the base token (token A) in this pair.                        |
| token\_b\_index  | The token index of the quote token (token B) in this pair. Index 0 = USDC.       |
| token\_a\_symbol | The resolved symbol of the base token (e.g. HYPE, LMTS, UBTC).                   |
| token\_b\_symbol | The resolved symbol of the quote token (e.g. USDC, USDH, USDT0).                 |
| pair             | Pair as token\_a\_symbol/token\_b\_symbol (e.g. HYPE/USDC).                      |
| is\_canonical    | Whether this is a canonical spot pair.                                           |

## Sample Query

```sql theme={null}
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
```
