# Swap Tokens

### Swap Using The Agent Chat Interface

You can initiate a swap by instructing your agent to exchange one asset for another. For example, if you tell it to “swap 1 SOL for RHUN,” it will first look up the coin through CoinGecko. If the coin is found, the swap will be executed using Jupiter on Solana. Once the transaction is confirmed, your agent will provide you with a Solscan link to verify the details.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOf4gVcGDjQobuj9fITxg%2Fuploads%2FzFna3pXsGIluErjk5SKp%2Fswap-demo-docs.mp4?alt=media&token=30e30551-1cf9-482f-b7b0-675725688c13>" %}

### Swap Using The Agent Embedded Wallet

You can swap using the embedded agent wallet by clicking on the "Swap" button in the chat sidebar located on the right-hand side of the chat interface.&#x20;

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

You can then choose your from and to token, and an optinal slippage tolerance.&#x20;

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

### Pricing

All swaps will incur a 1% fee on the total USD amount of the transaction.&#x20;


---

# Agent Instructions: 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:

```
GET https://rhun-capital.gitbook.io/rhun/tools/swap-tokens.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
