Non-custodial token swap on Base via Permit2, paid per call with x402 USDC micropayments.
What it does
Silverback's `/api/v1/swap` endpoint executes non-custodial token swaps on Base (chain ID 8453) using the Permit2 mechanism. Rather than executing the swap server-side, it returns EIP-712 Permit2 signing data that the caller signs and broadcasts themselves, keeping full custody of funds. The endpoint accepts a wallet address, input/output token identifiers (symbols like USDC/WETH or 0x contract addresses), a human-readable amount, and an optional slippage parameter.
This endpoint is part of the Silverback x402 DeFi Intelligence API, a suite of 11 pay-per-use endpoints covering swap execution, technical analysis, yield intelligence, arbitrage scanning, token audits, whale tracking, portfolio queries, pool analysis, and more. All endpoints use the x402 micropayment protocol: an initial request returns a 402 Payment Required challenge, the caller signs a USDC authorization (on Base, Solana, or SKALE), and resubmits with payment proof to receive the JSON response.
The swap endpoint is priced at $0.05 per call (the highest tier in the Silverback pricing structure). Payment is accepted in USDC on Base (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913), Solana, or SKALE Base Hub (zero gas). A 15% discount is available when paying with the $BACK token via Permit2 on Base. The endpoint is live and returning 402 challenges as expected.
Capabilities
Use cases
- —AI agents autonomously swapping tokens on Base without custodial risk
- —Automated trading bots that need Permit2 signing payloads for non-custodial execution
- —Portfolio rebalancing workflows that construct and sign swaps programmatically
- —DeFi aggregator integrations needing swap routing on Base
Fit
Best for
- —Autonomous AI agents needing non-custodial on-chain swap execution
- —Developers building agent-driven DeFi workflows on Base
- —Pay-per-use swap infrastructure without API key subscriptions
Not for
- —Swaps on chains other than Base (use jupiter-quote endpoint for Solana)
- —Users who need the transaction fully executed server-side (this returns signing data only)
- —High-frequency trading requiring sub-cent transaction costs (priced at $0.05/call)
Quick start
curl -X POST https://x402.silverbackdefi.app/api/v1/swap \
-H "Content-Type: application/json" \
-d '{
"walletAddress": "0xYourWalletAddress",
"tokenIn": "USDC",
"tokenOut": "WETH",
"amountIn": "100",
"slippage": "1"
}'Example
Request
{
"tokenIn": "USDC",
"amountIn": "100",
"slippage": "1",
"tokenOut": "WETH",
"walletAddress": "0x1234567890abcdef1234567890abcdef12345678"
}Endpoint
Quality
Full OpenAPI schema with clear request parameters, pricing, and protocol details. The endpoint is live (402 challenge captured). However, no example 200 response body is documented, the external docs link returns a 404, and the 402 challenge object was empty, so payment details beyond what the OpenAPI describes are not directly confirmed.
Warnings
- —External docs at https://x402.silverbackdefi.app/docs returns 'Cannot GET /docs' — documentation link is broken.
- —No example 200 response schema is provided; the response structure for swap signing data must be inferred.
- —The captured x402 challenge object was empty — payment parameters (token address, amount in base units, network) could not be independently verified from the probe.
- —This endpoint returns EIP-712 signing data only; the caller must sign and broadcast the transaction themselves.
Citations
- —The swap endpoint is priced at $0.05 per call and returns EIP-712 Permit2 signing data for non-custodial swaps on Base.https://x402.silverbackdefi.app
- —Silverback provides 11 pay-per-use endpoints via x402 micropayments, accepting USDC on Base, Solana, and SKALE.https://x402.silverbackdefi.app
- —$BACK token payments via Permit2 on Base receive a 15% discount.https://x402.silverbackdefi.app
- —Required request fields are walletAddress, tokenIn, tokenOut, and amountIn; slippage defaults to 1%.https://x402.silverbackdefi.app