# DeFi Oracle — Best Swap Route Finder

> DeFi Oracle — Best Swap Route Finder is a paid API for AI agents from aracil.vercel.app, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-15).

Finds the optimal cross-DEX swap route between two tokens on a specified chain, returning ranked route options with pricing data.

## Facts

- Endpoint: POST https://aracil.vercel.app/api/best-route
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-oracle-best-swap-route-finder-800fa1f1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hNMSWkIqUBW-UIEfou9Uj

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 defi-oracle-best-swap-route-finder-800fa1f1 -d '<json body>'
```

Example prompt: Find the best swap route to trade $500 of ETH to USDC on Base — show me all available routes and which one gives the best deal.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically identify the best on-chain swap route between two tokens before executing a trade, or when comparing DEX routing options across liquidity pools. It is particularly useful for agents managing DeFi portfolios, executing token swaps optimally, or building trade strategies that require route-level detail rather than just a price quote.

## Known failure modes

- Unsupported token symbols result in no routes found
- Invalid or unsupported chain name causes an error response
- Token pair with no liquidity returns empty routes array
- Malformed request body missing required fields returns validation error
- Network or RPC connectivity issues may cause timeouts or stale data

## How this service works

DeFi data for AI agents — yield rates, swap routes, IL calculator, liquidation risk, MEV scanner, TVL tracking. Powered by DeFiLlama + on-chain RPC data. Pay with USDC on Base via x402.

## Output

Returns a best_route object with the optimal swap path, an all_routes array listing every discovered route ranked by efficiency, the total number of routes found, and echoed inputs including from/to token symbols, chain, and amount in USD.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "to_token",
  "from_token"
 ],
 "properties": {
  "chain": {
   "type": "string"
  },
  "to_token": {
   "type": "string",
   "description": "Target token symbol"
  },
  "amount_usd": {
   "type": "number"
  },
  "from_token": {
   "type": "string",
   "description": "Source token symbol"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string"
  },
  "from": {
   "type": "string"
  },
  "chain": {
   "type": "string"
  },
  "all_routes": {
   "type": "array"
  },
  "amount_usd": {
   "type": "number"
  },
  "best_route": {
   "type": "object"
  },
  "routes_found": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-oracle-best-swap-route-finder-800fa1f1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from aracil.vercel.app](https://www.zero.xyz/host/aracil.vercel.app/llms.txt)
