{"uid":"cap_Z7e7sanmZZDMAKsHWpbxm","slug":"fortiswap-quote-05d56335","name":"FortiSwap Quote","description":"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.","url":"https://app.fortiblox.com/api/quote","method":"POST","headers":{},"bodySchema":{"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"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wsh7ITD-QVx-TIn6CZr-u","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Best route for large token trade","prompt":"I want to swap 10000000 raw units of mint So11111111111111111111111111111111111111112 for as much of mint EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v as possible on X1 — use exactIn mode and tell me the price impact, all route legs, and any alternative paths FortiSwap finds."},{"title":"Exact-out purchase of a Degen token","prompt":"I need to buy exactly 250000 raw units of the X1 mint DgnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX and want to know how much So11111111111111111111111111111111111111112 I have to spend — run it in exactOut mode on FortiSwap with a max of 3 hops."},{"title":"Pre-trade slippage and fee check","prompt":"Before I build my swap transaction, can you get me a FortiSwap quote for swapping 1000000 raw units of mint EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v to So11111111111111111111111111111111111111112 in exactIn mode and show me the dynamic slippage, the 25 bps fee breakdown, and when the quote expires?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:35:14.279Z","isFirstParty":false}