The Swap API is 10FI's standard best-route product for same-chain swaps and cross-chain bridges. It optimizes price and speed across aggregated liquidity. When the winning route is a normal on-chain swap or bridge transaction, the user pays blockchain network gas from their wallet.
Do not market Swap API as universally gasless. Use Gasless API when you need sponsored execution.
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/quote | Compare routes; read best.source (10fi-onchain or 10fi-crosschain for Swap API wins). |
| POST | /v1/swap | Build execution payload. Expect type: "onchain" or type: "solana" for Swap API routes. |
| GET | /v1/transfer-status | Track cross-chain transfers after the source-chain tx is sent. |
gasless=false if you want Swap API–only ranking, or leave default and inspect best.gasless./v1/swap with preferGasless: false when you intend a standard wallet transaction.steps[] transaction in order (approvals first), or send tx if no steps array.curl "https://api.10fi.org/v1/quote?chain=bsc&from=USDT&to=BNB&amount=100&gasless=false" \
-H "X-Client-Id: $TENFI_CLIENT_ID" -H "X-API-Key: $TENFI_API_KEY"
curl -X POST "https://api.10fi.org/v1/swap" -H "Content-Type: application/json" \
-H "X-Client-Id: $TENFI_CLIENT_ID" -H "X-API-Key: $TENFI_API_KEY" \
-d '{ "chain":"bsc", "from":"USDT", "to":"BNB", "amount":"100",
"userAddress":"0xYourWallet", "preferGasless":false, "slippageBps":50 }'
Cross-chain is part of Swap API. Set toChain on quote and provide toAddress for non-EVM destinations. The response includes a source-chain transaction; poll /v1/transfer-status with the tx hash.
curl "https://api.10fi.org/v1/quote?chain=bsc&toChain=solana&from=USDT&to=SOL&amount=100&userAddress=0x...&toAddress=YourSolanaAddress" \
-H "X-Client-Id: $TENFI_CLIENT_ID" -H "X-API-Key: $TENFI_API_KEY"
Full reference: /docs · Gasless product: /docs/gasless-api