https://api.uatu.dev.
Quoting requires an API key, so create one in the console first. The
catalogue endpoints are open.
The flow
1
Request for a quote
POST /quotes with the pair, the amount and who receives the output.2
Read the steps
The response carries a
steps array: an ordered list of ready-to-send
transactions, typically a Permit2 approval followed by the swap.3
Send each step in order
Sign and broadcast with your own wallet, waiting for each to confirm.
Write the integration
- viem
- ethers.js
Get a read-only quote
POST /quotes/routes takes the same body, with matching originChainId and
destinationChainId, and returns the best acceptable quote per DEX, ordered by
output amount. Nothing is persisted and no transaction steps are returned. Use it
while a user is still choosing, then call POST /quotes for a fresh executable quote.
Common pitfalls
Amounts come in two forms
Amounts come in two forms
amount on the request is a decimal string in display units, so "1" means
one WETH. Amounts on the response are integer strings in the token’s smallest
unit: amountOut of "2493777615" is 2493.777615 USDC at 6 decimals. Use
amountOutFloat for display and the raw integers for anything on-chain.Quotes expire
Quotes expire
deadline is a Unix timestamp five minutes out. Check it before broadcasting,
especially if a user has been staring at a confirmation screen.Steps are ordered and must all land
Steps are ordered and must all land
A swap usually needs its Permit2 approval mined before the swap itself. Wait
for each receipt rather than firing them together.
amountOutMinimum is enforced on-chain
amountOutMinimum is enforced on-chain
It is encoded into the calldata, so a fill worse than that floor reverts
rather than filling badly. A reverted swap that cost gas is usually a moved
market, not a bad request. Re-quote and retry.
Native assets use value
Native assets use value
When the input token is the chain’s native asset, the step carries
value. Send
it, or the swap reverts.Error handling
Every failure shape, with real responses.