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.
Authentication
Section titled “Authentication”None. Intents Swap is public: it runs in the browser with no key, and is rate-limited per IP.
Parameters
Section titled “Parameters”pairKeyRequired · pathrangeOptional · query
Responses
Section titled “Responses”- 200The pair's data
Request
Section titled “Request”curl https://api.intents.fi/v0/swap/pair/<pairKey>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();import httpx
response = httpx.get( "https://api.intents.fi/v0/swap/pair/<pairKey>",)response.raise_for_status()data = response.json()Errors
Section titled “Errors”{ "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.