# Swap pair data

> GET /v0/swap/pair/{pairKey}. Live market rate, price series, amount ladders, cost by size, routes compared, completion stats, market stats, correlation, historical rates and recent swaps for one swap pair (pair keys as in the page URLs, e.g. `btc-to-eth`, `usdt-trc20-to-btc`). Public, edge-cached 30


`GET /v0/swap/pair/{pairKey}`

Live market rate, price series, amount ladders, cost by size, routes compared, completion stats, market stats, correlation, historical rates and recent swaps for one swap pair (pair keys as in the page URLs, e.g. `btc-to-eth`, `usdt-trc20-to-btc`). Public, edge-cached 30 s. Every block carries `updatedAt` and a `stale` flag.

## Authentication

None. Intents Swap is public: it runs in the browser with no key, and is rate-limited per IP.

## Parameters

| Parameter | In | Required | Notes |
|---|---|---|---|
| `pairKey` | path | yes |  |
| `range` | query | no |  |

## Responses

| Status | Means |
|---|---|
| `200` | The pair's data |


## Request



```bash title="curl"
curl https://api.intents.fi/v0/swap/pair/<pairKey>
```

```ts title="TypeScript"
const response = await fetch("https://api.intents.fi/v0/swap/pair/<pairKey>", {
  method: "GET",
});

if (!response.ok) {
  const { error } = await response.json();
  throw new Error(`${error.code}: ${error.message}`);
}
const data = await response.json();
```

```python title="Python"
import httpx

response = httpx.get(
    "https://api.intents.fi/v0/swap/pair/<pairKey>",
)
response.raise_for_status()
data = response.json()
```



## Errors

```json
{ "error": { "code": "INVOICE_EXPIRED", "message": "This invoice has expired" } }
```

Switch on `code`, not on the message: every code has a page under [Error codes](/docs/errors/). Base URL `https://api.intents.fi`; the whole reference is on [one page](/docs/api).

---

Source: https://intents.fi/docs/api/get-swap-pair-pairkey · The whole corpus: https://intents.fi/docs/llms-full.txt
