> For the complete documentation index, see [llms.txt](https://docs.kumbaya.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kumbaya.xyz/developers/apis/exchange-api.md).

# Exchange API

The Exchange API is Kumbaya's hosted backend for trading-side data. It powers the Kumbaya frontend and is also available to integrators.

| Field             | Value                                                            |
| ----------------- | ---------------------------------------------------------------- |
| Base URL          | `https://exchange.kumbaya.xyz`                                   |
| OpenAPI / Swagger | [`exchange.kumbaya.xyz/docs`](https://exchange.kumbaya.xyz/docs) |
| Auth              | Mix of public, partner-keyed, and rate-limited (per route)       |

> **Building an LLM agent?** These endpoints are also available as MCP tools - 29 of them under the `dex_` prefix. See the [MCP Server](/developers/building-agents/agent-kit/mcp.md), part of the [Kumbaya Agent Kit](/developers/building-agents/agent-kit.md).

## What's available

| Endpoint group                                      | Purpose                                               |
| --------------------------------------------------- | ----------------------------------------------------- |
| [**Quote**](/developers/apis/exchange-api/quote.md) | Get swap quotes (single endpoint, multiple modes)     |
| [**Pools**](/developers/apis/exchange-api/pools.md) | Pool directory, metrics, ticks, admitted-pool lookups |
| [**Stats**](/developers/apis/exchange-api/stats.md) | Global TVL, volume, fees, timeseries                  |
| Tokens                                              | Trending tokens, history (see Swagger)                |
| Users                                               | Position lookups by address (see Swagger)             |
| Status                                              | Swap execution status by tx hash                      |

## Authentication

See [**Authentication**](/developers/apis/exchange-api/authentication.md) for the auth model. The short version:

* **Public, no auth** - health, status, pools, tokens, stats, and user-position endpoints
* **Partner key required** - every quote endpoint: `GET /api/v1/quote`, `POST /api/v1/quote`, `POST /api/v1/quote/open`, and `GET /api/v1/quote/tokens`. Without an `x-api-key` they return `401 { "error": "Invalid API key" }`. Request a key from the Kumbaya team.

## Live exploration

The Swagger UI at `/docs` is the source of truth for current parameters and response shapes. These docs link to it for anything we don't re-document here.
