# x402 DeFi Intel – Swap Quote

> x402 DeFi Intel – Swap Quote is a paid API for AI agents from cryptodefidataintel-production.up.railway.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns a cross-chain swap quote including input/output token amounts, best route, price impact, and routing signal for a given token pair and amount.

## Facts

- Endpoint: GET https://cryptodefidataintel-production.up.railway.app/api/swap-quote
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-defi-intel-swap-quote-f563fc1b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yK_IKbzZ-UHmYK_23wUdF

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 x402-defi-intel-swap-quote-f563fc1b
```

Example prompt: What's the best swap quote to convert 1,000,000 USDC (inputMint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) to SOL (outputMint: So11111111111111111111111111111111111111112) with a slippage tolerance of 50 basis points?

## When to prefer this

Use this endpoint when you need a real-time DEX swap quote on Solana with route intelligence and price impact analysis — especially when you want aggregated routing across multiple DEXes (like Orca, Raydium) with a confidence signal, rather than querying a single DEX directly. Ideal for agents that need to evaluate swap feasibility before execution.

## Known failure modes

- Missing required parameters (inputMint, outputMint, amount) returns a 400 error
- Invalid or unrecognized mint addresses return an error or empty route
- No liquidity available for the token pair returns null outAmount or error
- High price impact trades may return a 'high_price_impact' signal warning
- Payment not provided or invalid x402 payment header returns 402 Payment Required
- Service temporarily unavailable returns 5xx error

## How this service works

Crypto-agent toolkit: cross-chain DeFi intelligence + execution helpers + retrieval for agents. 16 endpoints: funding, open interest, long/short, token-safety, yield, prices, gas, tx-simulate, approval-check, bridge-quote, governance-search, lending, liquidations, protocol-search, swap-quote, token-resolve. Pay-per-call via x402.

## Output

Returns a JSON object with the swap route details: inAmount and outAmount in base units, routeLabels showing which DEX(es) are used (e.g. Orca), priceImpactPct as a percentage, a signal string (e.g. 'low_price_impact'), a human-readable insight string, confidence score (0–1), and sources array indicating which aggregators were queried.

## 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": [
      "inputMint",
      "outputMint",
      "amount"
     ],
     "properties": {
      "amount": {
       "type": "string"
      },
      "inputMint": {
       "type": "string"
      },
      "outputMint": {
       "type": "string"
      },
      "slippageBps": {
       "type": "integer"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "inAmount": "1000000",
   "outAmount": "6900000",
   "routeLabels": [
    "Orca"
   ],
   "priceImpactPct": 0.02
  },
  "signal": "low_price_impact",
  "insight": "Best route via Orca.",
  "sources": [
   "jupiter"
  ],
  "confidence": 0.8
 }
}
```

## More

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