# SafeRoute DEX Swap Quote

> SafeRoute DEX Swap Quote is a paid API for AI agents from saferoute-x402-production.up.railway.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Returns a safety-checked DEX swap quote (unsigned calldata or gasless payload) for approved Base network token pairs, without holding funds or broadcasting transactions.

## Facts

- Endpoint: POST https://saferoute-x402-production.up.railway.app/v1/quote
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saferoute-dex-swap-quote-99fdddbf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iC4WiF1ofrSTq8ETnUVcM

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 saferoute-dex-swap-quote-99fdddbf -d '<json body>'
```

Example prompt: Get me a safety-checked swap quote to buy WETH using 100 USDC on Base from my wallet 0xAbCd1234...5678, using standard execution mode.

## When to prefer this

Use SafeRoute when your agent needs a non-custodial, safety-checked DEX swap quote on Base network for approved tokens (USDC, WETH, EURC, cbETH, cbBTC, VIRTUAL, AERO) and requires either standard unsigned calldata or a gasless signable payload. Prefer this over raw DEX aggregators when safety validation, agent attribution (sourceAgentId), and non-custodial guarantees matter. Best for AI agents executing DeFi swaps up to $500 USDC equivalent without custody risk.

## Known failure modes

- Unsupported token pair — only 7 approved symbols accepted, any other token returns an error
- Amount exceeds $500 USDC equivalent cap — request rejected
- Invalid wallet address format — must be a valid 0x EVM address
- Token pair ineligible for swap — sibling eligibility endpoint should be checked first
- Service unavailability on Railway deployment — HTTP 5xx response
- Malformed intentId or referralCode — fails schema pattern validation

## How this service works

Buy a safety-checked Base DEX swap quote for USDC, WETH, EURC, cbETH, cbBTC, VIRTUAL, or AERO. Returns unsigned calldata or a buyer-signable gasless payload; SafeRoute never holds funds, signs, or broadcasts.

## Output

Returns either unsigned calldata (standard mode) or a buyer-signable gasless payload for the requested token swap on Base, including the swap route, expected output amount, and transaction parameters — without the service holding funds, signing, or broadcasting anything.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "enum": [
    "USDC",
    "WETH",
    "EURC",
    "CBETH",
    "CBBTC",
    "VIRTUAL",
    "AERO"
   ],
   "type": "string",
   "description": "Approved Base buy-token symbol"
  },
  "from": {
   "enum": [
    "USDC",
    "WETH",
    "EURC",
    "CBETH",
    "CBBTC",
    "VIRTUAL",
    "AERO"
   ],
   "type": "string",
   "description": "Approved Base sell-token symbol"
  },
  "amount": {
   "type": "string",
   "pattern": "^\\d+(?:\\.\\d+)?$",
   "description": "Human-readable sell amount, capped at $500 USDC equivalent"
  },
  "wallet": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$",
   "description": "Buyer-controlled taker wallet"
  },
  "intentId": {
   "type": "string",
   "pattern": "^[a-zA-Z0-9_-]+$",
   "maxLength": 128,
   "minLength": 16
  },
  "referralCode": {
   "type": "string",
   "pattern": "^[a-zA-Z0-9_-]+$",
   "maxLength": 64,
   "minLength": 3
  },
  "executionMode": {
   "enum": [
    "standard",
    "gasless"
   ],
   "type": "string",
   "default": "standard"
  },
  "sourceAgentId": {
   "type": "string",
   "maxLength": 128,
   "minLength": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/saferoute-dex-swap-quote-99fdddbf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from saferoute-x402-production.up.railway.app](https://www.zero.xyz/host/saferoute-x402-production.up.railway.app/llms.txt)
