# Swap

Inter-token exchange must have a liquidity pool for that token pair, and the reserve value for token token\_address\_in must be at least amount.&#x20;

If all conditions are met and the contract is performed, the number of tokens in token\_in\_address from the user's wallet will be transferred to the liquidity pool by amount\_in, and tokens for token\_address\_out will be paid.&#x20;

Setting minimum\_amount\_out prevents swaps when set below the corresponding quantity.

```
{
    "transaction": {
        "type": "Swap",
        "token_address_in": "dc2d6ab6d6a6000fb82931cc6ea3989629d051612701158df1214",
        "token_address_out": "450a8c9a1a72c285d919ef86c673542b5396ee79dffb6b58fc8",
        "amount_in": "100000000000000000000",
        "minimum_amount_out": "50000000000000000000",
        "timestamp": 1735694190022786,
        "from": "f43808a3998233c4336d873880fe4a22fdd7eafdd90e"
    },
    "public_key": "391e87c9ceedb34ecd7f74d4536a33851ce54dbb0c2dfbf1a529816f8ed7",
    "signature": "de081b535e1ef03432dcef296639b44238adf56d41c2cbfd699c5e1478b25"
}
```


---

# 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://saseul-gold.gitbook.io/saseul-gold-docs/dex-api/swap.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.
