Prerequisites
API Key
Get your API key for authentication at
Pods
Token Addresses
Contract addresses for the tokens you want to swap
Chain IDs
Chain IDs for source and destination chains
Authentication
Include your API key in the
x-api-key headerOverview
The Pods API supports both same-chain and cross-chain token swaps. The system automatically detects the swap type based on the chain IDs provided and routes to the appropriate provider.Same-chain Swap: When
originChain equals destinationChain
Cross-chain Swap: When originChain differs from destinationChainGetting a Quote
Endpoint
This is a v2 endpoint. Always use
/v2/swap/quote for new integrations.
Pass wallet addresses (and pixKey for fiat offramps) on the quote so the
response includes executable fields — you do not need POST /v2/swap/bytecode.Required Parameters
Optional Parameters
Either
amountIn OR amountOut is required (not both). Use amountOut for
exact output swaps (“I want to receive exactly X tokens”).Example Requests
Same-Chain Swap (Ethereum USDT to USDC)
Cross-Chain Swap (Ethereum to Polygon)
Same route using chain IDs
Cross-chain with a preferred provider
When several providers can quote the same route, passpreferredProvider to persist and return that provider’s quote (for example, to keep routing consistent with your UI or compliance rules):
Multi-route aggregation
For routes supported by more than one provider, the API requests quotes in parallel, ranks them bytokenOut.expectedAmountOut, and returns a single quote object — the best route by default, or the preferredProvider when set.
- Only that quote is saved to the database. Prefer requesting the quote with
originAddress+destinationAddress(orpixKey) so execution fields are returned in the same response. - Fixed-quote Pods bridge routes (
podsprovider) still use a single provider;preferredProvidermust bepodsor omitted on those paths.
Response Format
The API returns a JSON object with one persisted quote. When bothoriginAddress and destinationAddress are supplied (or originAddress + pixKey for fiat offramps), the response also includes executable fields (id, chainId, transactionData, and for fiat onramps paymentInstructions). That is the recommended integration path. The quote always includes a feeBreakdown object that itemizes platform fees (Pods fee, customer markup fee) and the estimated bridge/slippage impact:
Fee breakdown (
feeBreakdown) is the canonical source for all quote
fees on every route — platform fees (Pods, customer markup) and bridge/spread
impact. It is returned on GET /v2/swap/quote only (not on
GET /v2/swap/status/:id). Charge labels are in English; localize in your UI.
The bridgeAndSlippage charge is signed — a negative amountRaw means
favorable price impact vs spot. Platform fees (pods, customer) are deducted
from tokenIn before the provider quote.Response Fields
quoteId
quoteId
Unique identifier for this quote. Use this when executing the swap.
chainIdIn & chainIdOut
chainIdIn & chainIdOut
Canonical numeric chain IDs for the swap route (source → destination). Prefer
these for new code; string
originChain / destinationChain and legacy
fromChainId / toChainId remain for compatibility.originChain & destinationChain
originChain & destinationChain
Source and destination chain names (e.g.,
ethereum, polygon, arbitrum).
These remain supported; numeric chainIdIn / chainIdOut are preferred for
new integrations.tokenIn & tokenOut
tokenIn & tokenOut
Complete token information including contract address, symbol, decimals,
amount, and chain ID.
tokenOut.expectedAmountOut and tokenOut.minAmountOut
are the provider guarantees after platform fees are taken from the input.feeBreakdown
feeBreakdown
Itemized costs: Pods fee, Customer fee, and Bridge fee + slippage
(combined, signed on
tokenOut). reference explains the spot baseline used
for the bridge charge. Zero-value charge lines are omitted; use summary for
aggregate totals that may be zero.provider
provider
Name of the swap provider used (e.g.,
1inch, Jupiter, TeleSwap, Mayan,
relay, lifi)deadline
deadline
Quote expiration as a Unix timestamp in seconds. Execute the swap before
this time.
deadlineDate
deadlineDate
Quote expiration as an ISO 8601 UTC string (e.g.
2024-01-20T12:30:00.000Z). Human-readable alternative to deadline.rawQuote
rawQuote
Provider-specific quote data (stringified JSON). Some bridge providers require
this when building transactions. This field is omitted from the response when
null — when present, the one-call quote path already consumes it for you.
Supported Chains
Ethereum
ethereumBase
baseOptimism
optimismArbitrum
arbitrumSolana
solanaPolygon
polygonGnosis
gnosisBitcoin
bitcoinHyperEVM
hyperevmMonad
monadFiat
fiat (off-ramp/on-ramp routes)Error Handling
The API returns appropriate error messages for:- Missing required parameters
- Invalid chain names or token addresses
- No available swap provider for the requested route
- Invalid or ineligible
preferredProvider(see Error Codes) - Provider-specific errors during quote generation
Example Error Response:
Next Steps
Execute Swap
Sign the transactions returned by the quote and track status
API Reference
View detailed API documentation