Skip to main content
Use the /api/v2 endpoints below to integrate with Route. Use Copy page in the page header for Markdown, or download OpenAPI JSON. The same menu offers MCP and AI-client shortcuts. See AI and MCP for documentation search. Use https://www.route.fun as the hosted API base. The production API is public and requires no API key or site login. Request limits and validation still apply. There is no signing service. Direct contract calls do not depend on this HTTP service.

Current API inputs

Mainnet chainId is 4663. Use ETH or a token address, not an ambiguous symbol. Zero address means native ETH; route legs use WETH. Native ETH to WETH is wrapping, not a supported swap pair. Imported metadata supports up to 36 decimals; token behavior still must pass execution checks. Amounts are positive base-unit integer strings. Exact input is capped at 2^127 - 1. Optional quote provider=route, provider=kyber or provider=zerox restricts a source; omit it to compare enabled sources. Check enabledProviders in configuration. Each provider has a separate fee-free executor; switching providers requires a new approval review. For Kyber, pass the optional variant; for 0x swaps, supply txOrigin as the signing EOA. Direct plans use typed branches; Kyber and 0x use an empty array, never client-supplied opaque calldata or RPC URLs. Unknown fields and duplicate query parameters are rejected. V2 charges no Route fee: protocolFeeBps is 0, feeAmount is "0", and amountOut equals grossAmountOut. amountOutMinimum is the signed user minimum received. Active contracts have no treasury or administrator; configuration reports zero addresses and feeRecipientChangeable: false. See fees for provider costs, receipts and migration details. execution.status is simulated or unavailable. Its amountOut and block describe a separate complete-transaction check; they do not replace the original fee-breakdown fields. gasSource distinguishes RPC estimates from heuristics. The UI and ranking use assessed output when available; token behavior for a synthetic caller is not proof that a user’s wallet can execute. POST requires application/json, at most 16384 bytes, completed within five seconds. Responses are uncached and include X-Request-Id. Errors have this form:
503 DEPLOYMENT_LOCKED means the service is not available for requests. Expensive work has a shared per-isolate limit of four concurrent requests and 60 admissions per minute. Identical concurrent quote searches share their in-flight work, but completed quotes are not cached for a later approval refresh. Concurrent RPC reads use bounded JSON-RPC batches. HTTP 429 responses trigger host-specific cooldowns honoring Retry-After (60 seconds if absent). This is overload protection, not distributed per-user rate limiting or full DDoS defense. Caches and concurrency are bounded. External responses have time and byte limits, and redirects are not followed.

Integrator responsibilities

The swap builder checks fresh quote output, but does not check the caller’s balance/allowance, simulate the complete swap, estimate its final gas, approve, sign or submit. It always returns simulationRequired: true. Quote-time synthetic checks do not replace this responsibility. After approval, re-quote, preserve the user’s minimum and approved target even if the provider changes, decode the returned transaction, simulate from the signing account, estimate fees, sign locally and verify the receipt. Handle price changes and network failures without silently loosening the minimum or resubmitting uncertain transactions. Full OpenAPI specification is generated in the app repository and synchronized to this repository’s root openapi.json. Each deployed app serves its own release schema at /api/openapi; that version can differ from these docs if a source change has not been deployed yet.