$0.005
per call · USD Coin on Base
Build an unsigned, simulated X1 swap transaction (base64 v0) for the given payer through the on-chain FortiBlox Router — routed, impact-capped, simulated before return; the 25 bps protocol fee is enforced in-program. Sign it with the payer key and broadcast via POST /api/tx/send (free). Amounts are raw base units. Requires a prior quote.
Endpoint
POST https://app.fortiblox.com/api/tx/build3
Calls / 30d
2
Unique payers / 30d
Aug 22
Last called
exact
Payment scheme
Call this service
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);
const res = await fetchWithPay("https://app.fortiblox.com/api/tx/build", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"amountIn": "1000000",
"inputMint": "B69chRzqzDCmdB5WYB8NRu5Yv5ZA95ABiZcdzCgGm9Tq",
"mode": "exactIn",
"outputMint": "So11111111111111111111111111111111111111112",
"payer": "4YksiSRD3VenFSXHGbaTAa9EEjN1Sxayqy3epMKhHBWB",
"slippageBps": 100
}),
});
const data = await res.json();curl -X POST \
"https://app.fortiblox.com/api/tx/build" \
-H "Content-Type: application/json" \
-d '{"amountIn":"1000000","inputMint":"B69chRzqzDCmdB5WYB8NRu5Yv5ZA95ABiZcdzCgGm9Tq","mode":"exactIn","outputMint":"So11111111111111111111111111111111111111112","payer":"4YksiSRD3VenFSXHGbaTAa9EEjN1Sxayqy3epMKhHBWB","slippageBps":100}' \
-H "X-PAYMENT: <signed x402 payment>"Example response
{
"blockhash": "5iMvGtFseNWxJw248AanzxGjb8Weo9eSyUfwjpQ3e1BK",
"computeUnitLimit": 135000,
"expectedOut": "2049354266",
"feeAmount": "5123386",
"feeApplied": true,
"feeEnforcedOnChain": true,
"guardUsed": false,
"hopFallbackApplied": false,
"hopsUsed": 4,
"lastValidBlockHeight": 72986069,
"maxAmountIn": null,
"minOut": "2023788571",
"mode": "exactIn",
"platformFee": {
"amountToken": "5123386",
"bps": 25,
"percent": "0.25"
},
"route": {
"amountIn": "1000000",
"amountOut": "2049354266",
"parts": [
{
"amountIn": "1000000",
"amountOut": "2049354266",
"guard": {
"hardExcluded": false,
"maxPriceDeviationPct": 0,
"minPoolTvlXnt": 65884.29,
"penaltyBps": 0,
"thin": false,
"worstTradeReservePct": 0.00623893
},
"legs": [
{
"address": "CAJeVEoSm1QQZccnCqYu9cnNF7TTD2fcUA3E5HQoxRvR",
"amountIn": "1000000",
"amountOut": "2049354266",
"feePpm": 2800,
"inMint": "B69chRzqzDCmdB5WYB8NRu5Yv5ZA95ABiZcdzCgGm9Tq",
"outMint": "So11111111111111111111111111111111111111112",
"priceImpactPct": 0.00623892,
"venue": "xdex"
}
],
"priceImpactPct": 0.00623892,
"requiresGuard": false
}
],
"priceImpactPct": 0.00623892,
"split": false
},
"routerVersion": "v2",
"safety": {
"level": "safe",
"reasons": []
},
"simulation": {
"unitsConsumed": 94432
},
"slippageBps": 100,
"slippageDynamic": false,
"splitApplied": false,
"transaction": "AQAAAAAAAAAAAAAAAAAAAAAA…base64 unsigned v0 transaction…",
"txSize": 498,
"usedAlt": true,
"usedRouter": true
}Payment details
0x581ab190df2b2932175d987e787acd28a85eaa1cUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913Is this your API?
Pin it to the top of DeFi and the homepage with a featured placement.
More from FortiSwap & similar services
FortiSwap · Tokens
app.fortiblox.com
List every token FortiSwap routes on the X1 blockchain (XDEX + Degen launchpad): mint, symbol, name, decimals, logo, USD price, 24h volume, TVL, trust tier. Call this first to resolve a symbol to a mint before quoting or building an X1 swap.
FortiSwap · Quote
app.fortiblox.com
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.
FortiSwap · Router Volume
app.fortiblox.com
Daily on-chain FortiBlox Router swap volume on X1 (UTC buckets, USD totals, fee totals, distinct users per day) from FortiBlox's own indexer, plus the FORTI usage-gate verdict. Use for X1 DEX activity analytics; query param days (1-365, default 90).