# Vybe Solana Swap Quote

> Vybe Solana Swap Quote is a paid API for AI agents from x402-api.vybenetwork.xyz, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-02).

Returns a swap quote for exchanging one Solana token for another, including routing, expected output amount, and price impact.

## Facts

- Endpoint: GET https://x402-api.vybenetwork.xyz/v4/trading/swap-quote?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402, finance
- Canonical page: https://www.zero.xyz/c/vybe-solana-swap-quote-b01d572e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1XhUPWMYRhRqMc7LMWTyZ

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 vybe-solana-swap-quote-b01d572e
```

Example prompt: Using Vybe's swap quote endpoint, get me a quote for swapping 0.5 SOL (mint So11111111111111111111111111111111111111112) to USDC (mint EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) with 1% slippage tolerance.

## When to prefer this

Use this endpoint when you need a real-time swap quote for Solana SPL tokens before executing a trade, want to compare expected output across token pairs, or need routing information for a Solana DEX swap. Prefer this over generic price feeds when you need slippage-aware, route-specific quotes rather than simple spot prices.

## Known failure modes

- Invalid or non-existent mint address returns an error
- Insufficient liquidity for the requested token pair or amount
- Amount of zero or negative returns validation error
- Payment not provided or insufficient USDC via x402 returns 402 Payment Required
- Network congestion may cause stale quote data
- Unsupported token pairs with no DEX liquidity path

## How this service works

Returns the expected output amount, swap rate, and slippage threshold for a given token pair and amount. Quotes are sourced through internal pool scanning using vetted liquidity criteria combined with external aggregators to maximize route coverage—prioritizing direct pools and vetted markets first.

This route is currently in beta and is subject to change.

## Output

Returns a SwapQuote object containing the expected output amount, price impact, fee details, routing path through DEX pools, and exchange rate for the requested token pair and input amount.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "amount",
  "inputMintAddress",
  "outputMintAddress"
 ],
 "properties": {
  "amount": {
   "type": "number",
   "format": "double",
   "description": "Amount of input token to swap (in UI units, e.g., 0.1 for 0.1 SOL)"
  },
  "slippage": {
   "type": "number",
   "format": "double",
   "nullable": true,
   "description": "Slippage tolerance in percentage (default: 0.5)"
  },
  "accountAddress": {
   "type": "string",
   "nullable": true,
   "description": "Wallet address (used for personalized routing)"
  },
  "inputMintAddress": {
   "type": "string",
   "format": "pubkey",
   "description": "Mint address of the input token"
  },
  "outputMintAddress": {
   "type": "string",
   "format": "pubkey",
   "description": "Mint address of the output token"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "inputMintAddress",
  "inAmount",
  "outputMintAddress",
  "outAmount",
  "otherAmountThreshold",
  "swapMode",
  "priceImpactPct",
  "routePlan",
  "outAmountUi",
  "otherAmountThresholdUi",
  "swapRate"
 ],
 "properties": {
  "inAmount": {
   "type": "string",
   "description": "Input amount in base units (lamports)"
  },
  "swapMode": {
   "type": "string",
   "description": "Swap mode (e.g., \"ExactIn\")"
  },
  "swapRate": {
   "type": "number",
   "format": "double",
   "description": "Exchange rate (output per 1 input token)"
  },
  "outAmount": {
   "type": "string",
   "description": "Expected output amount in base units"
  },
  "routePlan": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "swapInfo",
     "percent"
    ],
    "properties": {
     "bps": {
      "type": "integer",
      "format": "int32",
      "nullable": true,
      "description": "Basis points"
     },
     "percent": {
      "type": "integer",
      "format": "int32",
      "description": "Percentage of the swap"
     },
     "swapInfo": {
      "type": "object",
      "required": [
       "ammKey",
       "label",
       "inputMintAddress",
       "outputMintAddress",
       "inAmount",
       "outAmount",
       "feeAmount",
       "feeMintAddress"
      ],
      "properties": {
       "label": {
        "type": "string",
        "description": "Label/name of the DEX"
       },
       "ammKey": {
        "type": "string",
        "description": "AMM key identifier"
       },
       "inAmount": {
        "type": "string",
        "description": "Input amount in base units"
       },
       "feeAmount": {
        "type": "string",
        "description": "Fee amount in base units"
       },
       "outAmount": {
        "type": "string",
        "description": "Output amount in base units"
       },
       "feeMintAddress": {
        "type": "string",
        "description": "Fee token mint address"
       },
       "inputMintAddress": {
        "type": "string",
        "description": "Input token mint address"
       },
       "outputMintAddress": {
        "type": "string",
        "description": "Output token mint address"
       }
      }
     }
    }
   },
   "description": "Route plan with swap information"
  },
  "timeTaken": {
   "type": "number",
   "format": "double",
   "nullable": true,
   "description": "Time taken to compute quote"
  },
  "contextSlot": {
   "type": "integer",
   "format": "int6
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vybe-solana-swap-quote-b01d572e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-api.vybenetwork.xyz](https://www.zero.xyz/host/x402-api.vybenetwork.xyz/llms.txt)
