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

# Concepts

> The conceptual toolkit behind Soroswap: AMMs, liquidity pools, swaps, fees, routing and the Stellar primitives they build on.

This section is your conceptual toolkit for understanding how Soroswap.Finance works. Before diving into tutorials or API calls, review these pages and master the fundamentals.

## What you'll find here

> [card] [AMM](https://docs.soroswap.finance/concepts/amm.md)
>
> How an Automated Market Maker replaces the order book.

> [card] [Liquidity Pools](https://docs.soroswap.finance/concepts/liquidity-pools.md)
>
> Where the tokens you trade against actually live.

> [card] [Swap](https://docs.soroswap.finance/concepts/swap.md)
>
> What happens when you exchange one token for another.

> [card] [Fees](https://docs.soroswap.finance/concepts/fees.md)
>
> What a trade costs and who collects it.

> [card] [Slippage](https://docs.soroswap.finance/concepts/slippage.md)
>
> Why the price you get can differ from the price you saw.

> [card] [Router](https://docs.soroswap.finance/amm/technical-reference/contracts/soroswap-router.md)
>
> The Soroswap AMM router: direct and multi-hop swaps across its pools.

> [card] [SDEX](https://docs.soroswap.finance/concepts/sdex.md)
>
> The Stellar Classic order book, and how it differs from Soroban AMMs.

> [card] [Aggregator API](https://docs.soroswap.finance/index.md)
>
> One API that splits a trade across several Stellar venues for the best price.

> [card] [Bridge](https://docs.soroswap.finance/concepts/bridge.md)
>
> Moving assets between Stellar and other chains.

> [card] [Trustlines](https://docs.soroswap.finance/concepts/trustlines.md)
>
> The Stellar rule you must satisfy before holding any non-native asset.

> [card] [Oracles](https://docs.soroswap.finance/concepts/oracles.md)
>
> Using pool reserves as an on-chain price feed.

> [card] [Flash Swaps](https://docs.soroswap.finance/concepts/flash-swaps.md)
>
> Withdrawing tokens first and paying for them in the same transaction.

## Going deeper

> [card] [Advanced Topics](https://docs.soroswap.finance/concepts/advanced)
>
> Pricing, understanding returns, security and open research questions.


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