Skip to main content
POST
Generate transaction bytecode

Authorizations

x-api-key
string
header
required

API key for authentication. Obtain from your Pods dashboard.

Body

application/json
quoteId
string
required

Quote ID from /v2/swap/quote

Example:

"550e8400-e29b-41d4-a716-446655440000"

accountId
string

Fireblocks vault account ID. Required when output=fireblocks.

Example:

"12"

originAddress
string

Address executing the swap on the origin chain (checksummed EVM or Solana public key)

Example:

"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj"

destinationAddress
string

Address receiving tokens on the destination chain (checksummed EVM or Solana public key). Required for onramps unless pixKey or USD bank account fields are provided for fiat offramps.

Example:

"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj"

output
enum<string>
default:bytecode

Response format. Fireblocks output requires accountId. instructions is Solana-origin only.

Available options:
bytecode,
userOperation,
fireblocks,
instructions
pixKey
string

PIX key for BRL fiat off-ramp routes. Use instead of destinationAddress.

bankAccountNumber
string

USD bank account number for USDC→USD offramp.

bankRoutingNumber
string

USD ABA routing number for USDC→USD offramp.

bankBeneficiaryName
string

Legal name on the USD bank account. ASCII only — Avenia rejects accents.

bankName
string

Bank name for the USD beneficiary.

beneficiaryStreetLine1
string

Beneficiary street address line 1.

beneficiaryStreetLine2
string

Beneficiary street address line 2 (optional).

beneficiaryCity
string

Beneficiary city.

beneficiaryState
string

Beneficiary state / province.

beneficiaryPostalCode
string

Beneficiary postal code.

beneficiaryCountry
string

Beneficiary country.

alias
string

USD beneficiary alias (defaults to bankBeneficiaryName).

description
string

Optional Avenia beneficiary description.

usdPaymentMethod
enum<string>

USD payment rail. Must match the quote when present.

Available options:
ACH,
WIRE
Example:

"WIRE"

rawQuote
any | null

Provider-specific raw quote data from the quote response. Pass this when the quote includes it.

thirdParty
boolean
default:false

Set to true for third-party PIX payouts. It must match the value used for the quote.

webhookURL
string<uri>

Optional per-quote webhook endpoint override. When set, it updates the quote webhookURL and is copied to the created action.

Example:

"https://example.com/webhooks/swap-action"

Response

Bytecode generated successfully

id
string
required

ID created for execution tracking

Example:

"65f1a2b3c4d5e6f789012345"

chainId
number
required
Example:

1

transactionData
object
required

Transaction data for execution

instructions
null[]

Solana instructions when output=instructions (Solana-origin only)

lutsByAddress
any | null

Solana lookup tables keyed by address when output=instructions