Non-custodial swap calldata for Base
api.agentstools.dev/swap/quote
Non-custodial swap calldata for Base: give tokenIn, tokenOut, raw amountIn, slippage and recipient; we read Aerodrome and Uniswap V3 on-chain state, pick the max-output route, and return ready-to-sign transaction calldata plus the ERC-20 approval, amountOutMin, price impact and the venues compared. You sign with your own wallet — we never hold or move funds.
GET
https://api.agentstools.dev/swap/quoteUptime100% of 2 checks 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
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://api.agentstools.dev/swap/quote?amountIn=1000000000000000000&recipient=0x1111111111111111111111111111111111111111&slippageBps=50&tokenIn=WETH&tokenOut=USDC");
console.log(await res.json());Example input
{
"amountIn": "1000000000000000000",
"recipient": "0x1111111111111111111111111111111111111111",
"slippageBps": 50,
"tokenIn": "WETH",
"tokenOut": "USDC"
}