Spot quote for swapping through a Uniswap V3 pool at the current tick
agent402.tools/api/dex-quote
Spot quote for swapping through a Uniswap V3 pool at the current tick. amountIn is in human units (not wei). zeroForOne=true sends token0 → token1; false sends token1 → token0. Returns amountOut net of the pool's fee tier.
POST
https://agent402.tools/api/dex-quoteUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://agent402.tools/api/dex-quote", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"network":"base","amountIn":1,"zeroForOne":true,"poolAddress":"0xd0b53d9277642d899df5c87a3966a349a798f224"}),
});
console.log(await res.json());Example input
{
"network": "base",
"amountIn": 1,
"zeroForOne": true,
"poolAddress": "0xd0b53d9277642d899df5c87a3966a349a798f224"
}