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

# API Reference

> REST API for the Privata swap aggregator. 50+ providers, single surface.

## Base URL

```
https://api.privataswap.com/partner/v1
```

Sandbox: `https://api.privataswap.com/partner/v1` with `pk_test_` key.

## Authentication

Every request requires `X-API-Key: pk_live_...` or `pk_test_...`. See [Authentication](https://docs.privataswap.com/guides/authentication.md).

## Versioning

Current: `v1.2`. Breaking changes ship under new major path (`/partner/v2`). Additive changes are backward-compatible inside `v1.x`.

## Conventions

* Times: ISO 8601 UTC (`2026-05-21T13:00:00Z`)
* Amounts: strings, native token precision
* Errors: structured JSON, see [Error codes](https://docs.privataswap.com/guides/errors.md)
* Idempotency: `Idempotency-Key` on `POST /orders`, 24h window
* Rate limits: 100 rps default, see [Rate limits](https://docs.privataswap.com/guides/rate-limits.md)

## Quick links

> [card] [Quickstart](https://docs.privataswap.com/guides/quickstart.md)
>
> Create your first order in 5 minutes.

> [card] [SSE streaming](https://docs.privataswap.com/guides/sse-streaming.md)
>
> Live order updates without webhooks.

> [card] [Webhooks](https://docs.privataswap.com/guides/webhooks.md)
>
> HMAC-signed delivery with dual-sign rotation.

> [card] [SDK (JS/TS)](https://docs.privataswap.com/sdk/js/install.md)
>
> Typed client with auto-retry and SSE.


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