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

# Swaps

> Converting between crypto and fiat at a locked rate.

Swaps convert value between assets — for example, crypto held in a wallet into NGN, or between two stablecoins — at a rate you lock in advance.

## 1. Estimate

Get a live, non-binding rate:

```bash theme={null}
GET /swaps/estimate
```

## 2. Create a quotation

Locks the current rate for **15 seconds**:

```bash theme={null}
POST /swaps/quotation
```

Returns a `quotationId`. Fetch it again anytime with `GET /swaps/quotation/{quotationId}` — useful to confirm you're still inside the lock window before executing.

## 3. Execute

```bash theme={null}
POST /swaps/quotation/{quotationId}/execute
```

Must be called within 15 seconds of creating the quotation, or the lock expires and you'll need a new one.

## Swap history

```bash theme={null}
GET /swaps           # list
GET /swaps/{id}      # single swap
```

Executed swaps fire `swap.completed` or `swap.failed` webhook events.
