# AgenticFi Swap Quote

> AgenticFi Swap Quote is a paid API for AI agents from defi-api.agenticfi.wtf, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Get a cross-chain or same-chain token swap quote including expected output amount and routing for a given token pair and amount

## Facts

- Endpoint: GET https://defi-api.agenticfi.wtf/api/swap/quote
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agenticfi-swap-quote-bd54b981
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zhVr6v731CFrphZ_x0xNV

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 agenticfi-swap-quote-bd54b981
```

Example prompt: What's the best swap quote to trade 0.001 WETH (0x4200000000000000000000000000000000000006) on Base (chain 8453) for USDC (0x833589fCD6EDB6E08f4c7C32D4f71b54bdA02913) also on Base, sending from my wallet 0x742d35Cc6634C0532925a3b844Bc454e4438f44e?

## When to prefer this

Use this endpoint when an AI agent needs to compute how much of a destination token a user will receive before committing to a swap, especially for cross-chain routes or Base ecosystem trades. Prefer this over on-chain simulation when you need fast, pre-trade pricing and routing without gas costs. Best for agents building DeFi workflows that require a quote step before execution.

## Known failure modes

- Invalid token address returns 400 bad request
- Unsupported chain ID returns error indicating chain not supported
- fromAmount of zero or negative value causes validation failure
- Liquidity unavailable for the requested pair returns no route found
- Payment not included or insufficient triggers x402 payment required response
- Rate limiting if too many calls are made without payment

## How this service works

DeFi APIs for AI agents. 36 pay-per-call endpoints for token data, pricing, wallet analytics, swap routing, and on-chain workflows. Powered by x402 on Base.

## Output

Returns a swap quote object containing the expected output token amount, routing path, estimated fees, price impact, and any slippage details for the requested token pair and amount across the specified chains

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "fromChain",
      "toChain",
      "fromToken",
      "toToken",
      "fromAmount",
      "fromAddress"
     ],
     "properties": {
      "toChain": {
       "type": "string",
       "title": "toChain (required)",
       "description": "Required. Destination chain ID Examples: 8453, 1, 42161"
      },
      "toToken": {
       "type": "string",
       "title": "toToken (required)",
       "description": "Required. Destination token address Examples: 0x833589fCD6EDB6E08f4c7C32D4f71b54bdA02913"
      },
      "fromChain": {
       "type": "string",
       "title": "fromChain (required)",
       "description": "Required. Source chain ID Examples: 8453, 1, 42161"
      },
      "fromToken": {
       "type": "string",
       "title": "fromToken (required)",
       "description": "Required. Source token address Examples: 0x4200000000000000000000000000000000000006"
      },
      "fromAmount": {
       "type": "string",
       "title": "fromAmount (required)",
       "description": "Required. Amount in smallest unit Examples: 1000000000000000"
      },
      "fromAddress": {
       "type": "string",
       "title": "fromAddress (required)",
       "description": "Required. Sender wallet address Examples: 0x742d35Cc6634C0532925a3b844Bc454e4438f44e, 0x1111111111111111111111111111111111111111"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agenticfi-swap-quote-bd54b981/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi-api.agenticfi.wtf](https://www.zero.xyz/host/defi-api.agenticfi.wtf/llms.txt)
