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

> Position-change events (increase, decrease, liquidation) for GMX perpetuals on MegaETH.

`megaeth.perpetuals.trades` contains one row per position-change event for GMX perpetual futures on MegaETH. `action` distinguishes an `increase`, a `decrease`, or a `liquidation`. Liquidations are also available on their own in [Liquidations](/historical-data/supported-blockchains/evm/megaeth/perpetuals/liquidations).

Current coverage includes GMX v2. `market_symbol` and `price_usd` may be null for some synthetic markets.

### Table Columns

| Column Name       | Description                                                                                                           | Type           | Example                                                            |
| ----------------- | --------------------------------------------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------ |
| project           | The perpetuals project.                                                                                               | varchar        | gmx                                                                |
| protocol          | The specific protocol within the project.                                                                             | varchar        | gmx                                                                |
| version           | Protocol version.                                                                                                     | varchar        | v2                                                                 |
| chain             | Blockchain network.                                                                                                   | varchar        | megaeth                                                            |
| block\_timestamp  | Block timestamp of the event.                                                                                         | timestamp\_ntz | 2026-07-23 13:57:05                                                |
| block\_date       | Calendar date of the event (UTC).                                                                                     | date           | 2026-07-23                                                         |
| block\_number     | Block number containing the event.                                                                                    | number         | 22,018,014                                                         |
| transaction\_hash | Transaction hash.                                                                                                     | varchar        | 0x260cf4065cf9b5e30859070fc05c8b1ea8ebc6cf5a394655f61c302c009788d5 |
| log\_index        | Position of the event log within the block.                                                                           | number         | 32                                                                 |
| unique\_id        | Unique identifier for the row.                                                                                        | varchar        | txn-0x260cf406...\_log\_index-32                                   |
| trader            | Wallet address that owns the position.                                                                                | varchar        | 0x64ee7b0c8e61e5d432d5ff464d28b0a3e173bc09                         |
| market\_address   | GMX market address.                                                                                                   | varchar        | 0x31edcc52be2fa55ba68f50409f9e6b7d9ebf3d59                         |
| market\_symbol    | Symbol of the market's index token.                                                                                   | varchar        | BTC                                                                |
| asset\_address    | Address of the index (traded) token.                                                                                  | varchar        | 0xc258141ad80caff9ab82a04beb1c10f4b5bcb8f4                         |
| side              | Position side: long or short.                                                                                         | varchar        | long                                                               |
| action            | Event type: increase, decrease, or liquidation.                                                                       | varchar        | increase                                                           |
| size\_usd         | Notional size in USD: the size change on an increase or decrease, and the full position size closed on a liquidation. | number         | 3837.228223                                                        |
| price\_usd        | Index token price in USD at the event.                                                                                | number         | 64978.316831                                                       |
| collateral\_usd   | Collateral added on an increase or returned on a decrease, in USD.                                                    | number         | 83.483187                                                          |
| pnl\_usd          | Realized profit or loss in USD. Null on increases; realized on decreases and liquidations.                            | number         |                                                                    |
| fee\_usd          | Total fee charged to the trader for the event, in USD.                                                                | number         | 2.302337                                                           |
| extra\_fields     | VARIANT column with protocol-specific detail.                                                                         | variant        |                                                                    |

### Sample Query

```sql theme={null}
SELECT *
FROM megaeth.perpetuals.trades
WHERE block_date = '2026-07-23'
LIMIT 100;
```
