base_swap
Swap on Base at the best price — a ready-to-sign transaction — 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. Required inputs: sell, buy, amount, taker. Priced $0.01 per call over x402 on Base; send a prepaid x-credit-token header for unlimited calls, or get 1 free call/day per tool. No API key required.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sell": "<sell>",
"buy": "<buy>",
"amount": "<amount>",
"taker": "<taker>"
},
"name": "base_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buy | Yes | Token you buy | |
| sell | Yes | Token you sell | |
| force | No | Pass 1 to quote a token that failed the sellability check anyway | |
| taker | Yes | Your wallet (signs the swap) | |
| amount | Yes | Amount you sell | |
| slippage | No | Slippage in bps (optional, default 100) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | The result payload. Shape is service-specific; every field is documented in the tool description. | |
| service | No | The service id that answered. | |
| checkedAt | No | ISO-8601 timestamp of when the underlying reads were taken. |