> 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/functions-and-entry-points/swapping-nfts-and-tokens.md).

# Swapping NFTs and Tokens

**`swap_tokens_for_nfts_with_slippage<CURRENCY>(...)`** and\
\&#xNAN;**`swap_nfts_for_tokens_with_slippage<CURRENCY>(...)`**\
**Purpose**: Execute trades between NFTs and tokens within the pool, similar to token swaps on an AMM.\
**Process**:

1. Verify the pool is active and ensure the trader is not on any deny list (via ART20 checks).
2. Calculate output amounts and verify slippage limits are respected.
3. Adjust pool reserves and transfer assets.
4. Emit a `TradeExecuted` event.

**Use Cases**:

* Traders can instantly buy or sell NFTs without waiting for a buyer or seller, relying on the pool’s liquidity.
* Automated trading strategies or arbitrageurs can operate on these pools.

**Best Practices**:

* Use strict slippage tolerances to avoid adverse price impacts.
* Monitor TWAP and other price signals before executing large trades.
