# 3Route Multichain Swap Quote & Transaction Builder

> 3Route Multichain Swap Quote & Transaction Builder is a paid API for AI agents from 3route.agents.bakingbad.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-13).

Returns an optimized DEX swap route and unsigned transaction for exchanging one token for another on a specified blockchain

## Facts

- Endpoint: GET https://3route.agents.bakingbad.dev/api/v6.1/%7BchainId%7D/swap?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/3route-multichain-swap-quote-transaction-builder-42fe583e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2yJE7J4mxUSF7kZWVZqll

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 3route-multichain-swap-quote-transaction-builder-42fe583e
```

Example prompt: Swap 1 ETH for USDC on Ethereum mainnet (chain ID 1) using my wallet address 0xAbC...123 as the sender, with a maximum slippage of 1% — give me the unsigned transaction I can sign and broadcast.

## When to prefer this

Use this endpoint when an agent needs to perform on-chain token swaps with optimized DEX routing across multiple protocols on a supported EVM chain. Prefer 3Route over single-DEX APIs when best execution price and multi-protocol aggregation matter. It is especially suited for autonomous agents that build and broadcast their own transactions, as it returns unsigned calldata rather than executing the swap on behalf of the user.

## Known failure modes

- 400 if amount is zero or invalid
- 400 if fee is outside the allowed range
- 400 if src or dst token address is not recognized on the specified chain
- No route found if liquidity is insufficient for the pair
- Stale quote if network conditions change between quote and broadcast
- Transaction revert if dstAmountMin is not met due to price movement exceeding slippage

## How this service works

3Route is an agent-ready multichain swap API from Baking Bad, a provider of tools for agents. Discover tokens for free, then pay per quote or unsigned swap.

## Output

Returns a ready-to-sign transaction object (to, data, gas, gasPrice, value, from), estimated gas integer, the actual src and dst token amounts, the aggregated route across DEX protocols, and optionally full token metadata for both the sold and bought tokens. The agent must sign and broadcast the transaction separately.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "chainId"
     ],
     "properties": {
      "chainId": {
       "enum": [
        "4663",
        "42793",
        "128064"
       ],
       "type": "string",
       "example": "4663",
       "pattern": "^[0-9]+$"
      }
     },
     "additionalProperties": false
    },
    "queryParams": {
     "type": "object",
     "required": [
      "src",
      "dst",
      "amount",
      "from"
     ],
     "properties": {
      "dst": {
       "type": "string",
       "example": "0x2222222222222222222222222222222222222222",
       "pattern": "^0x[0-9a-fA-F]{40}$"
      },
      "fee": {
       "type": "number",
       "default": 0,
       "maximum": 3,
       "minimum": 0
      },
      "src": {
       "type": "string",
       "example": "0x0000000000000000000000000000000000000000",
       "pattern": "^0x[0-9a-fA-F]{40}$"
      },
      "from": {
       "type": "string",
       "example": "0x1111111111111111111111111111111111111111",
       "pattern": "^0x[0-9a-fA-F]{40}$"
      },
      "amount": {
       "type": "string",
       "example": "1000000000000000000",
       "pattern": "^[0-9]+$"
      },
      "gasPrice": {
       "type": "string",
       "example": "1000000000",
       "pattern": "^[0-9]+$"
      },
      "receiver": {
       "type": "string",
       "example": "0x1111111111111111111111111111111111111111",
       "pattern": "^0x[0-9a-fA-F]{40}$"
      },
      "referrer": {
       "type": "string",
       "example": "0x1111111111111111111111111111111111111111",
       "pattern": "^0x[0-9a-fA-F]{40}$"
      },
      "slippage": {
       "type": "number",
       "default": 1,
       "example": 1,
       "maximum": 50,
       "minimum": 0
      },
      "protocols": {
       "type": "string"
      },
      "isExactOutput": {
       "type": "boolean",
       "default": false
      },
      "includeProtocols": {
       "type": "boolean",
       "default": false
      },
      "excludedProtocols": {
       "type": "string"
      },
      "includeTokensInfo": {
       "type": "boolean",
       "default": false
      },
  
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "tx": {
   "to": "0x2222222222222222222222222222222222222222",
   "gas": "210000",
   "data": "0x1234",
   "from": "0x1111111111111111111111111111111111111111",
   "value": "1000000000000000000",
   "gasPrice": "1000000000"
  },
  "gas": 210000,
  "dstAmount": "950000",
  "srcAmount": "1000000000000000000",
  "dstAmountMin": "940500"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/3route-multichain-swap-quote-transaction-builder-42fe583e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 3route.agents.bakingbad.dev](https://www.zero.xyz/host/3route.agents.bakingbad.dev/llms.txt)
