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

# Trades

> Raw Hyperliquid trades data. Two fills make a trade.

The `hyperliquid.raw.trades` table contains raw trade data for Hyperliquid (spot and perp). Two fills make a trade. To resolve spot `coin` to a pair (e.g. HYPE/USDC), join to `hyperliquid.raw.spot_coin_pairs` on `coin = name`.

## Table Columns

| Column Name       | Description                                                                                                                                                                                                                                                                                                                                                             |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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 |
| price             | Price of the coin at the time of the trade                                                                                                                                                                                                                                                                                                                              |
| side              | B = Buy (spot) / Long (perpetuals)  A = Sell (spot) / Short (perpetuals)                                                                                                                                                                                                                                                                                                |
| size              | Units of the coin that were traded                                                                                                                                                                                                                                                                                                                                      |
| users             | An array of 2 users that were involved in the trade                                                                                                                                                                                                                                                                                                                     |
| transaction\_hash | The transaction hash for the trade.  \*See notes for Null Transaction hash.                                                                                                                                                                                                                                                                                             |
| trade\_id         | An identifier for the trade. Some historical trades share a tid of 0                                                                                                                                                                                                                                                                                                    |
| timestamp         | The UTC timestamp of when the trade was executed                                                                                                                                                                                                                                                                                                                        |
| unique\_id        | A unique identifier for each trade                                                                                                                                                                                                                                                                                                                                      |
| extra\_fields     | Additional information for each trade. See notes for more details.                                                                                                                                                                                                                                                                                                      |
