> ## 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.

# Liquidity Management on Soroswap

> Managing Soroswap liquidity: wallet setup, adding liquidity to a pool, and withdrawing your share.

On **Soroswap Finance**, liquidity management is facilitated through **liquidity pools** managed by an [**Automated Market Maker (AMM)**](https://docs.soroswap.finance/concepts/amm.md). This automated approach allows for efficient and continuous asset conversion without the need for a traditional order book. Here’s an overview of how to interact with liquidity pools on Soroswap and get started.

### What is a Liquidity Pool?

**Liquidity pools** on Soroswap enable users to deposit and withdraw assets efficiently. **Automated Market Makers (AMMs)** manage these pools using mathematical formulas to set asset prices and ensure constant liquidity.

For a detailed explanation of liquidity pools, refer to the Definition of [Liquidity Pools.](https://docs.soroswap.finance/concepts/liquidity-pools.md)

### Getting Started with Soroswap Finance

To start using Soroswap Finance, follow these essential steps:

**1. Set Up Your Wallet**

* **Install Freighter Wallet**: Download and install the Freighter browser extension from [Freighter Wallet](https://freighter.app).
* **Set Up Your Account**: Create a keypair or import an existing account using a mnemonic phrase. Then, switch to the Testnet from the network dropdown in Freighter.
* **Get Test XLM:** To cover transaction fees, use the Friendbot to fund your [testnet](https://developers.stellar.org/docs/learn/fundamentals/networks#testnet) account with 10,000 lumens. Just enter your Stellar public address to receive the funds. Check the guide for [Soroswap testnet overviews](https://docs.soroswap.finance/tutorials/soroswap-testnet-overview.md).

**2. Add and Manage Liquidity**

Adding and managing liquidity on Soroswap Finance involves the following steps:

* **Access the Add Liquidity Page**: Go to the relevant section on Soroswap to manage liquidity. Check the [guide for Adding Liquidity for detailed instructions.](https://docs.soroswap.finance/tutorials/adding-liquidity.md)
* **Select Tokens**: Choose the tokens you wish to add to the pool. Review the pool information before confirming the transaction.
* **Create a New Liquidity Pool**: When adding liquidity, you may create a new pool. Provide an initial amount of each asset you wish to include. Here’s the key information:
  * **Minting Tokens**: The amount of tokens minted to represent your share in the pool.
  * **Exchange Rate**: The rate between the assets you are depositing into the pool.
  * **Maximum Slippage**: The tolerance for price deviation that can cause the transaction to revert if prices change more than 0.5%.
  * **Pool Share**: Your percentage of ownership in the pool after adding liquidity.
  * **Network Fee**: The fee associated with the transaction.

Once completed, review the details and submit the transaction. You can check the transaction status and hash on [Stellar.Expert](https://stellar.expert) or [StellarChain.io](https://stellarchain.io).

**3. Remove Liquidity**

To adjust your participation or withdraw liquidity from a pool:

* **Access the Remove Liquidity Page**: Navigate to the appropriate section on Soroswap to manage liquidity removal. Refer to [the guide for Removing Liquidity for detailed instructions.](https://docs.soroswap.finance/tutorials/remove-liquidity.md)
* **Select the Amount to Withdraw**: Choose the amount of liquidity you wish to withdraw and review the related information before confirming.
* **Complete the Transaction**: Follow the steps provided to withdraw the assets corresponding to your share in the pool.


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