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

# Swaps

> Exchange between your own currency books.

A **swap** moves value between two books you own (for example USD → NGN) using a firm [FX quote](https://docs.keette.com/guides/fx.md). No beneficiary is involved.

## Sequence

1. `POST /v1/fx/quotes` with `"purpose": "swap"`, `from`, `to`, and one amount
2. `POST /v1/swaps` with that `quote_id` (and an idempotency key)
3. Poll `GET /v1/swaps/{id}` or listen for swap webhooks

```bash theme={null}
curl https://api.keette.com/v1/swaps \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "quote_id": "…",
    "idempotency_key": "swap-usd-ngn-001"
  }'
```

Both books must exist and the source book must have enough **available** to cover the debit.

## Dev mode

Firm partner quotes and swaps are refused in dashboard Dev. Use Live or your sandbox cloud environment when you need a real partner-backed swap.

## Next

* [FX](https://docs.keette.com/guides/fx.md)
* [Balances](https://docs.keette.com/guides/balances.md)
* [API reference — Swaps](https://docs.keette.com/api-reference/swaps)


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