Before you start
Create an API key in the uatu console, then store it in an environment variable:https://api.uatu.dev.
1. Choose a chain
GET /blockchains returns every supported chain and its token definitions. This
endpoint does not require authentication.
code mirrors the HTTP status, message
describes the result, and data contains the payload. Here is the Ethereum entry,
shortened for clarity:
chainId. For this Ethereum swap, use 1 for both
originChainId and destinationChainId in the quote request.
2. Choose the tokens
Filter the token catalogue by the selected chain. OmitchainId to list tokens on
every chain.
data field is an array:
address for the quote. Keep decimals as well: raw amounts
in the response use the token’s smallest unit.
3. Request a quote
POST /quotes prices the pair across the available DEX routes and returns the best
route with ready-to-sign transaction data.
Replace 0xYourRecipientAddress with the address that will receive USDC:
amount is a decimal string in the input token’s
display units, so "1" means 1 WETH—not 1 wei. slippageBps is optional; 50
allows 0.5% slippage. If omitted, the server default applies. See
Slippage for details.
4. Read and execute the quote
The response includes the chosen route, the minimum acceptable output, an expiry, and the transactions your wallet must submit. This representative response is shortened:- Display
amountOutFloat, but use the integer amount fields for on-chain logic. - Make sure the current Unix time is earlier than
deadline; otherwise, request a new quote. - Submit every item in
stepsin order with the wallet infrom, waiting for each transaction to confirm before sending the next. - Include a step’s
valuewhen present. Native-token swaps use it to carry the transaction’s native value.
amountOutMinimum. If the market moves below that floor,
the transaction reverts instead of filling at a worse price.
Integrate the API
Send quote steps with viem or ethers.js and handle common edge cases.
Full API reference
Review every endpoint, parameter, and response schema.