> For the complete documentation index, see [llms.txt](https://docs.vera.financial/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vera.financial/developers/api-references/nft-exchange.md).

# NFT Exchange

### createTrade:

**Inputs:**

* NFT address, the tokenID
* Address in which they want to get paid and the amount
* Expiration date .

**Output:**

* Tx ID

This function will be used by sellers to list a new trade opportunity.

When called, the user will be asked to approve the transaction, and the NFTs will be transferred

to the smart contract . The function will generate a unique trade ID.

### Purchase

**Input:**

* Tx ID

This function will be called by buyers to perform a trade by sending the trade ID. The function

will get the tokens to pay with from them, they need to approve them first, collect a fee, and

send the rest to the seller.At the same time, it will send the NFTs to the buyer. The trade is then marked as completed.

### expireTrade:

**Input:**

* Tx ID

This function can be called by a seller to expire a non fulfilled trade to recover their NFT token.

### withdrawFees:&#x20;

The administrator of the smart contract can call this function to withdraw fees.

### ListTrades:

**Inputs:** None

**Outputs:** List of available NFT for sale with details.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.vera.financial/developers/api-references/nft-exchange.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
