# FortiSwap Quote

> FortiSwap Quote is a paid API for AI agents from app.fortiblox.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns the best swap route on the X1 blockchain across XDEX and Degen pools for a given exact-in or exact-out amount, including live-verified reserves, price impact, dynamic slippage, fee disclosure, route legs, alternatives, and a quote expiry slot.

## Facts

- Endpoint: POST https://app.fortiblox.com/api/quote
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fortiswap-quote-05d56335
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Z7e7sanmZZDMAKsHWpbxm

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 fortiswap-quote-05d56335 -d '<json body>'
```

Example prompt: Get me a FortiSwap quote to swap exactly 500000 raw units of mint So11111111111111111111111111111111111111112 into mint EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v on X1 in exactIn mode with dynamic slippage and up to 4 hops.

## When to prefer this

Use this endpoint when you need the best multi-hop swap route specifically on the X1 blockchain across both XDEX and Degen pools before constructing a transaction. It is the required precursor to /api/tx/build. Prefer it when you need live price impact, fee transparency, and alternative route comparison rather than just a price lookup.

## Known failure modes

- Invalid or unrecognized mint address returns 400 with an invalid mint error
- No route found between the two mints returns a no-route error
- amountIn or amountOut is zero or missing for the selected mode returns a validation error
- maxHops exceeds 8 is clamped; if set above 6 the built transaction may differ from the quote
- simulate:true without a valid payer address returns a simulation error
- Quote expiry: if the market moves significantly before /api/tx/build is called, the route may be stale
- Payment failure (x402) returns a 402 response requiring 0.001 USDC payment

## How this service works

Best swap route on X1 across XDEX and Degen pools for exact-in or exact-out, with live-verified reserves, price impact, dynamic slippage, fee disclosure (25 bps taken on-chain by the FortiBlox Router), route legs, alternatives and a quote expiry slot. Amounts are raw base units. Call before /api/tx/build.

## Output

Returns the optimal swap route across XDEX and Degen pools on X1, including all route legs, live-verified reserve data, price impact percentage, dynamic or explicit slippage in bps, the 25 bps on-chain fee disclosure, alternative routes, minimum/maximum output amounts in raw base units, and a quote expiry slot. The quote is ready to be passed directly to /api/tx/build.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "enum": [
    "exactIn",
    "exactOut"
   ],
   "type": "string",
   "description": "default exactIn"
  },
  "payer": {
   "type": "string",
   "description": "base58 payer for simulate:true"
  },
  "maxHops": {
   "type": "number",
   "description": "default 4; clamped to 1-8 by the pathfinder. Keep ≤ 6 so /api/tx/build (on-chain router, max 6 legs) executes the same route."
  },
  "amountIn": {
   "type": "string",
   "description": "raw base units of inputMint (exactIn)"
  },
  "simulate": {
   "type": "boolean",
   "description": "simulate the build (needs payer)"
  },
  "amountOut": {
   "type": "string",
   "description": "raw base units of outputMint (exactOut)"
  },
  "inputMint": {
   "type": "string",
   "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
   "description": "base58 X1 mint address"
  },
  "outputMint": {
   "type": "string",
   "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
   "description": "base58 X1 mint address"
  },
  "slippageBps": {
   "type": "number",
   "description": "explicit slippage in bps (clamped); omitted = dynamic"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fortiswap-quote-05d56335/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from app.fortiblox.com](https://www.zero.xyz/host/app.fortiblox.com/llms.txt)
