Overview
Swapper API v1 is the versioned API for integrators who build their own deposit or swap experience: list the chains and tokens Swapper supports, get a quote with a ready-to-sign transaction, and track the transfer until it lands. It runs on the same routing engine as the widget, with API keys, published rate limits, stable error codes, and integrator fees.
Base URL
https://swapper.finance/api/v1All paths on these pages are relative to this base (e.g. POST https://swapper.finance/api/v1/quote). v1 is production (mainnet) only — there is no testnet environment for the API.
GET https://swapper.finance/api/v1 answers {"version":"v1"}, which makes a handy connectivity check.
Two ways to call it
How you're identified
integrator: your integratorId
x-swapper-api-key header — the key identifies your integrator
Call it from
Your servers or the browser
Your servers only
Rate limits (per minute)
50 quote / 300 other, per client IP
600 quote / 1,200 other, per integrator
See Authentication and Rate Limits for the details. API keys are created in the Integrator Dashboard.
Quick start
The examples quote 10 USDC on Base (8453) into ETH on Arbitrum (42161). Amounts are integer strings in the token's smallest unit, so 10 USDC (6 decimals) is 10000000.
1. Get a quote
With an API key, send it in the x-swapper-api-key header instead of integrator, from your server — that's also what lets you add your own fee. toAddress defaults to fromAddress; slippage defaults to 0.005 (0.5%). All fields: Quote.
2. Sign and send
The quote is a single step: the route, its estimate, and the transaction to send. Abridged:
ERC-20 source: make sure
estimate.approvalAddressis approved to spend at leastfromAmountof the source token; send anapprovefirst if not. Native-token sources need no approval.Send
transactionRequestfromfromAddress— the user signs it in their own wallet. On Solana,datais a base64-encodedVersionedTransactionto sign and send.Re-quote after
expiresAt(unix seconds). Quotes are short-lived; don't send stale calldata.
3. Track it
Poll the status with the source-chain transaction hash (and the source chain) until it settles:
status is PENDING while the transfer is in flight and ends as DONE or FAILED; right after broadcasting it can briefly be NOT_FOUND. See Status.
A transfer is only recorded once something tracks it, so always poll /v1/status: that's what sends the transaction.completed webhook and attributes your integrator fee to the transfer.
Conventions
Requests.
GETendpoints take flat query parameters; lists are comma-separated (chains=8453,42161) or repeated (chains=8453&chains=42161).POSTendpoints take a JSON body (Content-Type: application/json).Amounts are integer strings in the token's smallest unit (wei, lamports,
1000000= 1 USDC). USD values are decimal strings.slippageandfeeare decimal fractions:0.005= 0.5%.Chains are identified by Swapper's chain id — a string such as
"8453","42161"or"mainnet-beta"(Solana) — or by chain key (base,arbitrum,solana), as listed byGET /v1/chains. These are the same ids the deposit widget uses. Requests take either; in a JSON body, EVM ids can also be numbers (8453). Responses always carry the id, as a string.Native tokens are the zero address on EVM (
0x0000000000000000000000000000000000000000;0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeEis accepted too) andSo11111111111111111111111111111111111111111on Solana (the System Program11111111111111111111111111111111is accepted too).Tokens can be given by address or by symbol (
USDC); only tokens listed byGET /v1/tokenscan be quoted.EVM addresses in responses are usually lowercase; compare them case-insensitively.
Every response carries an
X-Request-Idheader. Errors use one envelope —{ "error": { "code", "message", "requestId" } }— see Errors.New fields can appear at any time. Ignore fields you don't recognize; see Versioning.
How routes are reported
One step,
tool: "swapper". Swapper picks the best route among several liquidity sources and bridges and returns it as a single step:toolis alwaysswapper,includedStepsis always empty, and fee entries use generic names (e.g. "Bridge fee", "Network fee").Quotes expire. Every quote carries
expiresAt; re-quote after it. The estimate also includespriceImpact, the total value lost between input and output.No route is a
404with the codeNO_ROUTE_FOUND— branch oncode, not on the status alone.Ecosystems: v1 routes between EVM chains and Solana; each chain's
ecosystem(evmorsolana) is listed byGET /v1/chains.
All endpoints are listed under Endpoints.
Last updated