{"uid":"cap_y_3LCWzIa_JPRQ4Euhh3h","slug":"solana-wallet-x402-swap-build-919481c1","name":"Solana Wallet x402 – Swap Build","description":"Three x402 checks an agent runs before it spends: (1) payee_check ($0.0045) before paying an unfamiliar x402 payTo, (2) seller_report ($0.01, on falcon-sol-agents.falcon-sol.workers.dev) to probe a seller's endpoints for uptime, valid 402s and price/payTo drift, (3) pretrade ($0.014) before buying a Solana token (rug/skim risk, xStock status, optional payee check). Each returns ok, caution, do_not_pay/avoid or unknown; unknown is never ok. Failures return 502 before settlement, so you are not charged. Pay-per-call Solana wallet profiles, funding-source clusters, and trending tokens. Agents pay USDC over x402 on Solana, and on Base through the Coinbase CDP facilitator when it is configured. Call free GET /wallet/preview or MCP wallet_preview before paying. Unpaid calls to paid routes return HTTP 402 even when the query is missing or invalid. A signed request with a bad query returns HTTP 400 and is not charged. GET /token/trending costs $0.005 and includes holder concentration, mint and freeze authority, LP lock or burn status, and sniper or bundle share of early supply. Risky results are plain-English risk flags. Successful bodies include cached, stale, and cacheAgeMs.","url":"https://solana-wallet-intel.falcon-sol.workers.dev/swap/build?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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","taker"],"properties":{"taker":{"type":"string","description":"Your wallet public key; it pays fees and must sign."},"amount":{"type":"string","description":"Input amount in smallest units (integer, e.g. lamports)."},"symbol":{"type":"string","description":"Optional ticker the output token claims, for the lookalike check."},"inputMint":{"type":"string","description":"Mint you sell (base58). Use So11111111111111111111111111111111111111112 for SOL."},"allowRisky":{"type":"string","description":"Optional. 1 builds the transaction even when pretrade says avoid."},"outputMint":{"type":"string","description":"Mint you buy (base58). This token gets the pretrade check."},"slippageBps":{"type":"string","description":"Optional slippage in bps, 1 to 500 (default 50)."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"quote":{"out_amount":"1018726"},"schema":"falcon.swap.v1","status":"built","pretrade":{"verdict":"ok"},"transaction":{"data":"<base64>","signed":false,"encoding":"base64"},"platform_fee":null}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.025","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.025/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_1ikkVekxbDvNaSNa1UJQ3","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.025","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Builds a signed-ready Solana token swap transaction with integrated pretrade rug/skim risk check before execution","exampleAgentPrompt":"Build me a swap transaction to trade 1,000,000 lamports of SOL (So11111111111111111111111111111111111111112) into USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) from my wallet 7xKpT3... with 50 bps slippage, and run the pretrade rug check before you build it.","exampleUseCases":[{"title":"Safe token swap with rug screening","prompt":"I want to swap 5,000,000 lamports of SOL into this new meme token at mint 8fjK2...abc, ticker PEPE2, from my wallet 4nRt7...xyz — run the pretrade check first and only build the transaction if it comes back ok. Use 100 bps slippage."},{"title":"Copy-trade with risk gate","prompt":"Build a swap transaction to buy 2,000,000 lamports worth of the token at mint DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263 from my wallet 9mLp...qrs — check it for rug and skim risk before proceeding, and set slippage to 50 bps."},{"title":"Automated agent DeFi execution","prompt":"My agent wallet is Bvr3...mnp. Build a swap from USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) to RAY (4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R) for 10,000,000 units with the pretrade check enabled and 75 bps slippage — I need the base64 transaction ready to sign."}],"resultDescription":"Returns a JSON object containing a base64-encoded unsigned Solana swap transaction ready to sign, the quote with expected output amount, a pretrade verdict (ok, caution, avoid, or unknown), platform fee info, and the schema version. If pretrade returns avoid and allowRisky is not set, the transaction may not be built. Failures before settlement return HTTP 502 so the caller is not charged.","failureModes":["HTTP 402 returned if payment is missing or insufficient (unpaid call to paid route)","HTTP 400 with no charge if query parameters are invalid or missing after payment","HTTP 502 returned on upstream failures before settlement, no charge incurred","pretrade verdict of avoid blocks transaction build unless allowRisky=1 is passed","unknown pretrade verdict is never treated as safe and may block execution","invalid mint addresses (not valid base58) cause 400 errors","amount must be an integer string in smallest units; decimal values cause errors"],"whenToPreferThis":"Use this endpoint when an AI agent needs to both screen a Solana token for rug/skim risk AND build a ready-to-sign swap transaction in a single call. It is the right choice when trading unfamiliar or newly discovered tokens where pretrade safety gating is critical. Prefer it over bare Jupiter or other swap builders when you want integrated risk verdicts, lookalike ticker checks, and the x402 pay-per-call model with no-charge failure guarantees before settlement.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-24T06:32:08.422Z","isFirstParty":false,"canonicalSlug":"solana-wallet-x402-swap-build-919481c1"}