> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prismapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Trade

> Normalized trade data representing the economic intent of a user.

| Field                | Type                                                             | Description                                        |
| -------------------- | ---------------------------------------------------------------- | -------------------------------------------------- |
| `id`                 | *Integer*                                                        | Unique identifier for the trade                    |
| `protocol`           | *[Protocol](/documentation/solana/dex/overview#data-sources)*    | DEX protocol that executed the trade.              |
| `swap_type`          | *[Swap Type](/documentation/solana/dex/datasets/swap#swap-type)* | Type of underlying swap pair based on token roles. |
| `wallet_address`     | *String \[address]*                                              | Wallet address that executed the trade             |
| `token_address`      | *String \[address]*                                              | Traded token address                               |
| `quote_address`      | *String \[address]*                                              | Quote token address                                |
| `position_address`   | *String \[address]*                                              | Wallet-token position address                      |
| `direction`          | *[Direction](#direction)*                                        | Direction of the trade.                            |
| `position_state`     | *[Position State](#position-state)*                              | Position state of the trade.                       |
| `token_amount`       | *Number*                                                         | Amount of traded token                             |
| `quote_amount`       | *Number*                                                         | Amount of quote tokens                             |
| `native_amount`      | *Number \[SOL]*                                                  | Native amount                                      |
| `usd_amount`         | *Number \[USD]*                                                  | Value of the trade                                 |
| `pre_token_balance`  | *Number*                                                         | Traded token balance before the trade              |
| `post_token_balance` | *Number*                                                         | Traded token balance after the trade               |
| `token_price`        | *Number \[USD]*                                                  | Price of traded token at trade time                |
| `quote_price`        | *Number \[USD]*                                                  | Price of quote token at trade time                 |
| `token_mcap`         | *Number \[USD]*                                                  | Market cap of the traded token at trade time       |
| `block_slot`         | *Integer*                                                        | Solana block slot number                           |
| `block_time`         | *String \[date-time]*                                            | Timestamp of the block                             |
| `tx_hash`            | *String*                                                         | Transaction signature                              |

## Direction

Indicates whether the trade increased or decreased the trader's exposure to the token.

*Enum(String)*

| Value  | Description            |
| ------ | ---------------------- |
| `buy`  | Trader bought a token. |
| `sell` | Trader sold a token.   |

## Position State

Describes how the trade affected the lifecycle of the trader's position in the token.

*Enum(String)*

| Value   | Description                                 |
| ------- | ------------------------------------------- |
| `open`  | Trader opened a position.                   |
| `close` | Trader closed a position.                   |
| `trade` | Trader executed a trade against a position. |
