402.com.tr/api/x402/base-swap
An executable swap on Base, routed by 0x across Uniswap, Aerodrome, Balancer, Curve and more. Returns the transaction for your own wallet to sign, plus the approval step if needed, minimum out, route and fees. We never hold funds. Name tokens as ETH, USDC, WETH, cbBTC, AERO… or a 0x address; buying an unknown token runs a sellability check first and refuses a honeypot unless force=1.
GET
https://402.com.tr/api/x402/base-swapUptime100% 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://402.com.tr/api/x402/base-swap?amount=10&buy=ETH&sell=USDC&slippage=100&taker=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045");
console.log(await res.json());Example input
{
"amount": "10",
"buy": "ETH",
"sell": "USDC",
"slippage": "100",
"taker": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
}