Get swap quote
Returns a persisted quote for swapping tokens on same or different chains, including Pods Ramp fiat rails (originChain or destinationChain of fiat). Brazil Pix supports Pix↔USDC on base/monad, Pix↔BRLA on polygon, Pix↔BRS on solana, and Pix↔Morpho hyperUSDCa on monad. Crypto BRLA↔BRS inventory rails (no Avenia/fiat leg) are supported on both polygon and base. Foreign USD supports WIRE/ACH↔USDC on ethereum, base, and polygon (Avenia direct delivery; see Ramp guides). Optional rampProvider pins the fiat ramp provider (avenia default). Customer extraRampProviders is an allowlist only and never auto-selects UnblockPay. UnblockPay quotes today are Pix↔USDC and USD WIRE↔USDC on polygon/base. USD ACH or ethereum on UnblockPay returns RAMP_PROVIDER_NOT_ELIGIBLE. Provide either originChain + destinationChain or chainIdIn + chainIdOut. Provide exactly one of amountIn or amountOut. When originAddress is provided with destinationAddress (crypto / fiat onramp), pixKey (Pix offramp), or flat USD bank account fields (USD offramp), the response also includes executable fields (transactionData, paymentInstructions, id) — preferred for new integrations instead of POST /v2/swap/bytecode. Optional usdPaymentMethod selects WIRE (default) or ACH on USD rails. Quotes expire after 5 minutes; quote.deadline is a Unix timestamp in seconds and quote.deadlineDate is an ISO 8601 string (UTC).
Authorizations
API key for authentication. Obtain from your Pods dashboard.
Query Parameters
Origin blockchain network name. Use with destinationChain.
"ethereum"
Origin chain ID. Alternative to originChain.
1
Destination blockchain network name. Use with originChain.
"polygon"
Destination chain ID. Alternative to destinationChain.
137
Input token contract address
"0xb794F5eA0ba39494cE839613fffBA74279579268"
Output token contract address
"0xb794F5eA0ba39494cE839613fffBA74279579268"
Input amount in token smallest unit. USD onramp: USD cents. USD offramp: USDC raw (6 decimals). Provide either amountIn or amountOut, not both.
"1000000000000000000"
Desired output amount in token smallest unit. USD onramp: USDC raw (6 decimals). USD offramp: USD cents. Provide either amountIn or amountOut, not both.
"1000000000000000000"
Recipient on the destination chain (checksummed EVM or Solana public key). Omit for quote-only requests; use pixKey instead for fiat destinations.
"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj"
PIX key for BRL fiat off-ramp destinations. Use instead of destinationAddress when destinationChain is fiat and tokenOut is BRL. Only an explicitly supplied pixKey on a crypto-to-BRL fiat off-ramp is validated with Avenia. Invalid or unknown keys return INVALID_PIX_KEY (400). Pricing-only quotes may continue when lookup is unavailable. Explicit Avenia HTTP 5xx responses also allow executable output; other lookup failures block executable output with PIX_KEY_LOOKUP_FAILED (502).
USD beneficiary alias. Defaults to bankBeneficiaryName when omitted. Used with bank account fields to resolve-or-create the Avenia beneficiary on quote.
"Payroll ACH"
USD bank account number for USDC→USD offramp. Required with the other bank fields for USD offramp destinations.
"123456789"
USD ABA routing number for USDC→USD offramp.
"021000021"
Legal name on the USD bank account. ASCII only — Avenia rejects accents (ã, é, …) with bankBeneficiaryName is invalid.
"John Smith"
Bank name for the USD beneficiary.
"Chase"
Beneficiary street address line 1.
"1 Main St"
Beneficiary street address line 2 (optional).
Beneficiary city.
"New York"
Beneficiary state / province.
"NY"
Beneficiary postal code.
"10001"
Beneficiary country (ISO-style code as accepted by Avenia).
"USA"
Optional Avenia beneficiary description.
USD payment rail for foreign USD onramp/offramp. Defaults to WIRE when omitted.
ACH, WIRE "WIRE"
Set to true for PIX off-ramp quotes paid to a third party. The value must match the bytecode request.
false
Sender address on the origin chain (checksummed EVM or Solana public key). When provided with destinationAddress, pixKey, or USD bank account fields, the response also includes executable payload fields.
"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj"
Address for refunds if swap fails
"0xb794F5eA0ba39494cE839613fffBA74279579268"
Response format when both originAddress and destinationAddress are provided. Defaults to bytecode. userOperation and fireblocks are EVM-origin only. instructions is Solana-origin only.
bytecode, userOperation, fireblocks, instructions Fireblocks vault account ID. Required when output=fireblocks.
"12"
Request fee sponsorship on eligible Pods bridge routes
false
Registered provider name to force when eligible for the route
"relay"
Fiat rail provider pin for onramp/offramp quotes. Omitted or empty defaults to avenia even when extraRampProviders includes unblockpay. The response returns this name as provider and omits rampProvider. Ignored on crypto-only quotes. Distinct from preferredProvider.
"avenia"
Slippage tolerance as a fraction of 1. Valid range is 0.0001 to 0.5.
"0.01"
Transfer speed for CCTP cross-chain swaps
fast, standard "fast"
Optional per-quote webhook endpoint. When set, quote lifecycle webhooks are delivered to this URL instead of the customer default webhookURL.
"https://example.com/webhooks/swap-quote"
Response
Quote generated successfully
Freshly generated swap quote returned by GET /v2/swap/quote
Action ID for execution tracking when bytecode is included
Origin chain ID when bytecode is included
Transaction data for execution
- object[]
- object
ERC-4337 user operation when output=userOperation and both addresses are provided
Solana instructions when output=instructions (Solana-origin only)
Solana lookup tables keyed by address when output=instructions