Skip to content
Intents Swap
GET/v0/swap/pair/{pairKey}

Swap pair data

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.

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

  • pairKeyRequired · path
  • rangeOptional · query
  • 200The pair's data
curl
curl https://api.intents.fi/v0/swap/pair/<pairKey>
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
import httpx
response = httpx.get(
"https://api.intents.fi/v0/swap/pair/<pairKey>",
)
response.raise_for_status()
data = response.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. Base URL https://api.intents.fi; the whole reference is on one page.