> For the complete documentation index, see [llms.txt](https://docs.artinals.com/artinals-protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.artinals.com/artinals-protocol/trade-module/events/tradeexecuted.md).

# TradeExecuted

**Purpose**: Emitted when a trade (swap) occurs in the pool, exchanging NFTs for tokens or tokens for NFTs.

**Key Inclusions**:

* `pool_id`: The pool where the trade happened.
* `trader`: The address executing the trade.
* `nft_amount`: Number of NFTs traded (bought or sold).
* `token_amount`: Number of tokens swapped.
* `is_buy`: Boolean indicating if the trader bought NFTs with tokens (true) or sold NFTs for tokens (false).
* `price_impact`: A measure of how this trade affected the pool’s price.
* `timestamp`: When the trade occurred.

**Use Cases**:

* Allow indexers and UIs to display real-time trade feeds.
* Help traders analyze recent market activity, trade volume, and price impact.
* Provide data for price charts, volume graphs, and other analytics tools.
