> For the complete documentation index, see [llms.txt](https://docs.henjin.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.henjin.xyz/henjinai-protocol/amm-v4/swap.md).

# Swap

<figure><img src="/files/YUZjU7SirXIx68ViiVFC" alt=""><figcaption></figcaption></figure>

### **To swap tokens on Henjin follow these steps**

1. Open the Henjin web app and connect your wallet. Then select the token drop-down.
2. Search for and select the token you wish to swap. You can browse the token list or search for a token by name or contract address.
3. Now you have to select the token you want to swap for. Select the token drop-down.
4. Search for and select the token you wish to swap for. You can browse the token list or search for a token by name or contract address.
5. Enter the amount you would like to swap, receive, or select the “Max” option.

{% hint style="info" %}
The “Max” option automatically inputs the total amount of the token you have available in your wallet for swapping.
{% endhint %}

6. Select “Swap”.
7. Review the swap details, and then select “Confirm Swap”.
8. In your wallet, approve spending for the token you are swapping. This will require a network cost.&#x20;

{% hint style="info" %}
If this is your first time swapping the token with the Henjin protocol, then you’ll need to approve the token in order to trade it.
{% endhint %}

9. In your wallet, sign the message. This transaction will not require a network cost.
10. In your wallet, confirm the swap. This transaction requires network costs.
11. Once confirmed, your swap is submitted to the blockchain and is pending.
12. You will see “Swap success” and a green checkmark on screen when the transaction is successfully completed.

You have now successfully swapped with Henjin! To view your swap on [Taikoblocks](https://taikoblocks.io), you can select “View on Explorer”.

<br>


---

# 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.henjin.xyz/henjinai-protocol/amm-v4/swap.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.
