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) pair BRLA on polygon, base, or gnosis with BRS on solana or 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
Query Parameters
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).
The customer pays the Pods fee for this quote: no Pods slice is deducted from the user, and the waived amount is invoiced to the customer at month end. On aggregator swaps and Pix ramps the Pods base fee is waived; on routes priced through the orderbook the FX spread is waived too. The customer markup is still charged. Requires fee sponsorship to be enabled for the customer (403 FEE_SPONSORSHIP_NOT_ALLOWED).
false
Customer markup for this quote in bps of the chargeable amount (amount-in on swaps, the USDC leg on ramps), replacing the configured markup. Integer up to 5000. Applies to aggregator swaps (1inch, LiFi, Relay, Uniswap, Jupiter) quoted by amountIn and to USDC fiat ramps (Pix and USD ACH/wire, onramp and offramp, on every rampProvider). A positive value requires a configured customer fee collector for the operation (422 MARKUP_RECIPIENT_NOT_CONFIGURED); values above 5000 return 422 MARKUP_BPS_ABOVE_MAX. A negative value absorbs that part of the Pods fee on aggregator swaps and on Pix ramps via BRLA: the user pays the Pods fee minus it (never below zero), no customer fee is transferred, the absorbed part is invoiced to the customer, and the fee breakdown shows a signed customer line. Negative values require fee sponsorship to be enabled for the customer (403 FEE_SPONSORSHIP_NOT_ALLOWED), cannot go below minus the Pods fee rate (422 MARKUP_BPS_BELOW_FLOOR, details.floorBps), cannot be combined with feeSponsorship (422 MARKUP_SPONSORSHIP_CONFLICT), and return 422 MARKUP_BPS_BELOW_FLOOR on USD ACH/wire and direct Pix ramps, which transfer each fee slice on its own. An amountOut aggregator swap charges no platform fee, so it cannot apply it; routes that cannot apply it (no platform fee split) are left out of ranking, and 422 MARKUP_OVERRIDE_NOT_ALLOWED is returned only when no eligible route can apply it or the requested preferredProvider cannot.
"40"
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"
Response
Quote generated successfully