swap_quote_and_build
Costs 0.001 USDC per call via x402. Returns the best route and an unsigned transaction, and for Solana swaps a rug-pull risk check of the output token (mint/freeze authority, token-2022 traps, holder concentration) so agents do not buy honeypots. Same-chain Solana swaps route through Jupiter with a referral fee account. Cross-chain routes try LI.FI Intents (solver-based, competitive pricing) first, then fall back to classic LI.FI routing. Supports Solana, Ethereum, Base, Arbitrum, Polygon, Bitcoin and Tron. The response contains a serialized unsigned transaction to be signed and broadcast by the caller. A 30 bps platform fee is embedded in the route.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Input amount in base units (lamports, wei, 1e-6 USDC) | |
| toChain | Yes | ||
| priority | No | fast | |
| fromChain | Yes | ||
| inputToken | Yes | Token address/mint, or symbol (SOL, USDC, USDT, ETH) | |
| outputToken | Yes | Token address/mint, or symbol | |
| slippageBps | No | ||
| userAddress | Yes | Wallet that signs the transaction on fromChain | |
| paymentProof | No | Payment proof: USDC tx hash on Polygon or Base (0x...) or Solana tx signature. Omit on the first call to receive the 402 payment instructions, pay, then call again with the proof. | |
| destinationAddress | No | Receiver on toChain; defaults to userAddress |