> ## Documentation Index
> Fetch the complete documentation index at: https://docs.soroswap.finance/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Soroswap Aggregator API: base URL https://api.soroswap.finance, pick the network with ?network=mainnet or ?network=testnet (omitted means mainnet).
> Auth: Authorization: Bearer sk_... on every call. Get a key at https://console.soroswap.finance/register. A missing or invalid key returns 401 with code and registerUrl (POST /send returns 403 instead); an expired JWT or a missing role returns 403. Free plan 1 request/s; see https://docs.soroswap.finance/api/plans.md.
> Flow: POST /quote (assetIn, assetOut as C... contract addresses, amount as an integer string in the smallest unit, tradeType, protocols) -> POST /quote/build with the unchanged quote and from -> the user signs the XDR -> POST /send. Build right after quoting: a Soroban XDR is valid for 180 seconds. Submit it as is, never re-simulate it.
> Partner id: every account has one (9 hex chars, permanent). Read partnerId from GET /partner, or in the console at https://console.soroswap.finance under Fees & payouts. The partner fee itself is switched on by Soroswap; see https://docs.soroswap.finance/api/fees.md.
> AI tools: docs MCP at https://docs.soroswap.finance/mcp (claude mcp add --transport http soroswap-docs https://docs.soroswap.finance/mcp), skill with npx skills add https://docs.soroswap.finance. Other clients: https://docs.soroswap.finance/api/build-with-ai.md.
> Units and Stellar pitfalls: https://docs.soroswap.finance/api/stellar-gotchas.md. Errors and retries: https://docs.soroswap.finance/api/errors.md.

# Adding Liquidity

> Step by step walkthrough for supplying liquidity to a Soroswap pool, including minting test tokens on testnet.

Now that we have our wallet set up correctly in the testnet, we are ready to use the [Soroswap app](https://app.soroswap.finance). Let's start by adding liquidity to a pool.

## Step 1: Setup

> [!NOTE]
>
> This setup step is testnet only. Minting test tokens and funding with Friendbot exist so you can practice without real funds. On mainnet you fund your wallet with real XLM and acquire real assets instead, and then continue from Step 2.

To begin adding liquidity on testnet, we need to first mint test tokens to interact with the app.

1. Go to the Balances page.
2. Click the "Mint test tokens" button.

The screenshot below is the testnet Balances page, which is where the minting button lives:

![](https://mintcdn.com/soroswap/1xzCGA5zGx88_Gb9/images/tutorials/adding-liquidity/balances.png?fit=max\&auto=format\&n=1xzCGA5zGx88_Gb9\&q=85\&s=99bb55178afccdd05d51955889120f16)

After minting your test tokens, ensure that your wallet is funded with at least 1XLM in Stellar. To fund your wallet in the testnet, you can use the friendbot. Simply go to your wallet and click "Fund with Friendbot".

![](https://mintcdn.com/soroswap/1xzCGA5zGx88_Gb9/images/tutorials/adding-liquidity/fund.png?fit=max\&auto=format\&n=1xzCGA5zGx88_Gb9\&q=85\&s=38fa366a64964f6a85ff25160ca0644b)

Verify that your account has been funded with XLM, and now we are ready to continue navigating the app.

## Step 2: Go to the Add Liquidity page

1. Navigate to the Liquidity page, where you will find all the liquidity positions.
2. Click the "Add Liquidity" button.

This will take you to a page like this:

![](https://mintcdn.com/soroswap/1xzCGA5zGx88_Gb9/images/tutorials/adding-liquidity/addliquidity.png?fit=max\&auto=format\&n=1xzCGA5zGx88_Gb9\&q=85\&s=309e06654cd7406a8af5621b42e71b03)

## Step 3: Select the tokens and provide liquidity

1. Click the token selectors.
2. Select the tokens for which you would like to provide liquidity.
3. Enter the amount you want to provide.
4. Click "Supply".

This will open a modal where you can view information about the liquidity position, such as the amount of Liquidity Pool Tokens that will be created and your share percentage of the pool.

![](https://mintcdn.com/soroswap/1xzCGA5zGx88_Gb9/images/tutorials/adding-liquidity/addliquiditymodal.png?fit=max\&auto=format\&n=1xzCGA5zGx88_Gb9\&q=85\&s=aaf769c5859ae46753be0a48e803d25b)

5. Click the "Add liquidity" button, and you will see a transaction in your Freighter wallet.

![](https://mintcdn.com/soroswap/1xzCGA5zGx88_Gb9/images/tutorials/adding-liquidity/transaction.png?fit=max\&auto=format\&n=1xzCGA5zGx88_Gb9\&q=85\&s=0de97a026be8f98b74f9196ac73617e9)

6. Click "Approve" and wait for the transaction to be confirmed.
7. Once the transaction is complete, you will see a success message like this:

![](https://mintcdn.com/soroswap/1xzCGA5zGx88_Gb9/images/tutorials/adding-liquidity/success.png?fit=max\&auto=format\&n=1xzCGA5zGx88_Gb9\&q=85\&s=6248bd9847316febf1d9dc8eeedcc098)

Congratulations! You have successfully added liquidity. Now you can view your liquidity position on the Liquidity page.

![](https://mintcdn.com/soroswap/1xzCGA5zGx88_Gb9/images/tutorials/adding-liquidity/liquiditypage.png?fit=max\&auto=format\&n=1xzCGA5zGx88_Gb9\&q=85\&s=8061ba7b3330e71f58a4aca3104c7efe)

Now we can continue with the tutorial. The next steps will involve swapping tokens for the ones you have provided liquidity for.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.