# SperaxOS DeFi Swap Quote API

> SperaxOS DeFi Swap Quote API is a paid API for AI agents from chat.sperax.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-20).

Returns an AI-powered swap quote for exchanging one token for another on DeFi protocols, payable via x402 micropayment with USDC on Base

## Facts

- Endpoint: GET https://chat.sperax.io/api/x402/v1/data/swap-quote?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/speraxos-defi-swap-quote-api-f7da3df4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xiL54N4cQa2r3L6uSmnTi

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 speraxos-defi-swap-quote-api-f7da3df4
```

Example prompt: What's the current swap quote to exchange 100 USDC for WETH on Base — I want to see the rate and estimated output before I trade.

## When to prefer this

Choose this endpoint when you need a real-time DeFi swap quote on Base chain before executing a trade, especially when you want AI-augmented route intelligence without managing API keys — paying only $0.005 USDC per call via x402. Prefer this over generic DEX aggregator APIs when operating within the SperaxOS ecosystem or when building wallet-native agents on Base.

## Known failure modes

- Unsupported token pair returns an error or empty quote
- Invalid token address results in a 400 bad request
- Insufficient liquidity for requested amount returns no route found
- Network or RPC issues may cause delayed or failed responses
- Payment failure via x402 protocol blocks the request before processing

## How this service works

AI-powered DeFi intelligence APIs payable via the x402 HTTP payment protocol. No API key required — pay per request with USDC on Base. Identity-only (SIWX) endpoints are free for wallets with an agentcash identity.

## Output

Returns a swap quote including estimated output token amount, exchange rate, price impact percentage, and optimal routing path for the requested token pair and input amount on the specified chain.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "if": {
   "type": "string"
  },
  "else": {
   "type": "string"
  },
  "properties": {
   "type": "string"
  }
 }
}
```

## More

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