curl --request POST \
--url https://api.pods.finance/v2/swap/bytecode \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"quoteId": "550e8400-e29b-41d4-a716-446655440000",
"accountId": "12",
"originAddress": "EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj",
"destinationAddress": "EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj",
"output": "bytecode",
"pixKey": "[email protected]",
"bankAccountNumber": "<string>",
"bankRoutingNumber": "<string>",
"bankBeneficiaryName": "<string>",
"bankName": "<string>",
"beneficiaryStreetLine1": "<string>",
"beneficiaryStreetLine2": "<string>",
"beneficiaryCity": "<string>",
"beneficiaryState": "<string>",
"beneficiaryPostalCode": "<string>",
"beneficiaryCountry": "<string>",
"alias": "<string>",
"description": "<string>",
"usdPaymentMethod": "WIRE",
"rawQuote": "<unknown>",
"thirdParty": false,
"webhookURL": "https://example.com/webhooks/swap-action"
}
'import requests
url = "https://api.pods.finance/v2/swap/bytecode"
payload = {
"quoteId": "550e8400-e29b-41d4-a716-446655440000",
"accountId": "12",
"originAddress": "EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj",
"destinationAddress": "EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj",
"output": "bytecode",
"pixKey": "[email protected]",
"bankAccountNumber": "<string>",
"bankRoutingNumber": "<string>",
"bankBeneficiaryName": "<string>",
"bankName": "<string>",
"beneficiaryStreetLine1": "<string>",
"beneficiaryStreetLine2": "<string>",
"beneficiaryCity": "<string>",
"beneficiaryState": "<string>",
"beneficiaryPostalCode": "<string>",
"beneficiaryCountry": "<string>",
"alias": "<string>",
"description": "<string>",
"usdPaymentMethod": "WIRE",
"rawQuote": "<unknown>",
"thirdParty": False,
"webhookURL": "https://example.com/webhooks/swap-action"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quoteId: '550e8400-e29b-41d4-a716-446655440000',
accountId: '12',
originAddress: 'EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj',
destinationAddress: 'EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj',
output: 'bytecode',
pixKey: '[email protected]',
bankAccountNumber: '<string>',
bankRoutingNumber: '<string>',
bankBeneficiaryName: '<string>',
bankName: '<string>',
beneficiaryStreetLine1: '<string>',
beneficiaryStreetLine2: '<string>',
beneficiaryCity: '<string>',
beneficiaryState: '<string>',
beneficiaryPostalCode: '<string>',
beneficiaryCountry: '<string>',
alias: '<string>',
description: '<string>',
usdPaymentMethod: 'WIRE',
rawQuote: '<unknown>',
thirdParty: false,
webhookURL: 'https://example.com/webhooks/swap-action'
})
};
fetch('https://api.pods.finance/v2/swap/bytecode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pods.finance/v2/swap/bytecode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'quoteId' => '550e8400-e29b-41d4-a716-446655440000',
'accountId' => '12',
'originAddress' => 'EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj',
'destinationAddress' => 'EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj',
'output' => 'bytecode',
'pixKey' => '[email protected]',
'bankAccountNumber' => '<string>',
'bankRoutingNumber' => '<string>',
'bankBeneficiaryName' => '<string>',
'bankName' => '<string>',
'beneficiaryStreetLine1' => '<string>',
'beneficiaryStreetLine2' => '<string>',
'beneficiaryCity' => '<string>',
'beneficiaryState' => '<string>',
'beneficiaryPostalCode' => '<string>',
'beneficiaryCountry' => '<string>',
'alias' => '<string>',
'description' => '<string>',
'usdPaymentMethod' => 'WIRE',
'rawQuote' => '<unknown>',
'thirdParty' => false,
'webhookURL' => 'https://example.com/webhooks/swap-action'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pods.finance/v2/swap/bytecode"
payload := strings.NewReader("{\n \"quoteId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"accountId\": \"12\",\n \"originAddress\": \"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj\",\n \"destinationAddress\": \"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj\",\n \"output\": \"bytecode\",\n \"pixKey\": \"[email protected]\",\n \"bankAccountNumber\": \"<string>\",\n \"bankRoutingNumber\": \"<string>\",\n \"bankBeneficiaryName\": \"<string>\",\n \"bankName\": \"<string>\",\n \"beneficiaryStreetLine1\": \"<string>\",\n \"beneficiaryStreetLine2\": \"<string>\",\n \"beneficiaryCity\": \"<string>\",\n \"beneficiaryState\": \"<string>\",\n \"beneficiaryPostalCode\": \"<string>\",\n \"beneficiaryCountry\": \"<string>\",\n \"alias\": \"<string>\",\n \"description\": \"<string>\",\n \"usdPaymentMethod\": \"WIRE\",\n \"rawQuote\": \"<unknown>\",\n \"thirdParty\": false,\n \"webhookURL\": \"https://example.com/webhooks/swap-action\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pods.finance/v2/swap/bytecode")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quoteId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"accountId\": \"12\",\n \"originAddress\": \"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj\",\n \"destinationAddress\": \"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj\",\n \"output\": \"bytecode\",\n \"pixKey\": \"[email protected]\",\n \"bankAccountNumber\": \"<string>\",\n \"bankRoutingNumber\": \"<string>\",\n \"bankBeneficiaryName\": \"<string>\",\n \"bankName\": \"<string>\",\n \"beneficiaryStreetLine1\": \"<string>\",\n \"beneficiaryStreetLine2\": \"<string>\",\n \"beneficiaryCity\": \"<string>\",\n \"beneficiaryState\": \"<string>\",\n \"beneficiaryPostalCode\": \"<string>\",\n \"beneficiaryCountry\": \"<string>\",\n \"alias\": \"<string>\",\n \"description\": \"<string>\",\n \"usdPaymentMethod\": \"WIRE\",\n \"rawQuote\": \"<unknown>\",\n \"thirdParty\": false,\n \"webhookURL\": \"https://example.com/webhooks/swap-action\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pods.finance/v2/swap/bytecode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quoteId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"accountId\": \"12\",\n \"originAddress\": \"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj\",\n \"destinationAddress\": \"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj\",\n \"output\": \"bytecode\",\n \"pixKey\": \"[email protected]\",\n \"bankAccountNumber\": \"<string>\",\n \"bankRoutingNumber\": \"<string>\",\n \"bankBeneficiaryName\": \"<string>\",\n \"bankName\": \"<string>\",\n \"beneficiaryStreetLine1\": \"<string>\",\n \"beneficiaryStreetLine2\": \"<string>\",\n \"beneficiaryCity\": \"<string>\",\n \"beneficiaryState\": \"<string>\",\n \"beneficiaryPostalCode\": \"<string>\",\n \"beneficiaryCountry\": \"<string>\",\n \"alias\": \"<string>\",\n \"description\": \"<string>\",\n \"usdPaymentMethod\": \"WIRE\",\n \"rawQuote\": \"<unknown>\",\n \"thirdParty\": false,\n \"webhookURL\": \"https://example.com/webhooks/swap-action\"\n}"
response = http.request(request)
puts response.read_body{
"id": "65f1a2b3c4d5e6f789012345",
"chainId": 1,
"transactionData": [
{
"chainId": "137",
"to": "0xb794F5eA0ba39494cE839613fffBA74279579268",
"data": "0x...",
"value": "0",
"from": "0xb794F5eA0ba39494cE839613fffBA74279579268"
}
],
"instructions": [
null
],
"lutsByAddress": "<unknown>"
}{
"error": {
"code": "QUOTE_NOT_FOUND",
"message": "Quote not found or expired"
}
}{
"error": {
"code": "QUOTE_NOT_FOUND",
"message": "Quote not found or expired"
}
}{
"error": {
"code": "QUOTE_NOT_FOUND",
"message": "Quote not found or expired"
}
}Generate transaction bytecode
Generate executable transaction bytecode from a quote. The quote must not be expired.
curl --request POST \
--url https://api.pods.finance/v2/swap/bytecode \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"quoteId": "550e8400-e29b-41d4-a716-446655440000",
"accountId": "12",
"originAddress": "EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj",
"destinationAddress": "EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj",
"output": "bytecode",
"pixKey": "[email protected]",
"bankAccountNumber": "<string>",
"bankRoutingNumber": "<string>",
"bankBeneficiaryName": "<string>",
"bankName": "<string>",
"beneficiaryStreetLine1": "<string>",
"beneficiaryStreetLine2": "<string>",
"beneficiaryCity": "<string>",
"beneficiaryState": "<string>",
"beneficiaryPostalCode": "<string>",
"beneficiaryCountry": "<string>",
"alias": "<string>",
"description": "<string>",
"usdPaymentMethod": "WIRE",
"rawQuote": "<unknown>",
"thirdParty": false,
"webhookURL": "https://example.com/webhooks/swap-action"
}
'import requests
url = "https://api.pods.finance/v2/swap/bytecode"
payload = {
"quoteId": "550e8400-e29b-41d4-a716-446655440000",
"accountId": "12",
"originAddress": "EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj",
"destinationAddress": "EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj",
"output": "bytecode",
"pixKey": "[email protected]",
"bankAccountNumber": "<string>",
"bankRoutingNumber": "<string>",
"bankBeneficiaryName": "<string>",
"bankName": "<string>",
"beneficiaryStreetLine1": "<string>",
"beneficiaryStreetLine2": "<string>",
"beneficiaryCity": "<string>",
"beneficiaryState": "<string>",
"beneficiaryPostalCode": "<string>",
"beneficiaryCountry": "<string>",
"alias": "<string>",
"description": "<string>",
"usdPaymentMethod": "WIRE",
"rawQuote": "<unknown>",
"thirdParty": False,
"webhookURL": "https://example.com/webhooks/swap-action"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quoteId: '550e8400-e29b-41d4-a716-446655440000',
accountId: '12',
originAddress: 'EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj',
destinationAddress: 'EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj',
output: 'bytecode',
pixKey: '[email protected]',
bankAccountNumber: '<string>',
bankRoutingNumber: '<string>',
bankBeneficiaryName: '<string>',
bankName: '<string>',
beneficiaryStreetLine1: '<string>',
beneficiaryStreetLine2: '<string>',
beneficiaryCity: '<string>',
beneficiaryState: '<string>',
beneficiaryPostalCode: '<string>',
beneficiaryCountry: '<string>',
alias: '<string>',
description: '<string>',
usdPaymentMethod: 'WIRE',
rawQuote: '<unknown>',
thirdParty: false,
webhookURL: 'https://example.com/webhooks/swap-action'
})
};
fetch('https://api.pods.finance/v2/swap/bytecode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pods.finance/v2/swap/bytecode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'quoteId' => '550e8400-e29b-41d4-a716-446655440000',
'accountId' => '12',
'originAddress' => 'EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj',
'destinationAddress' => 'EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj',
'output' => 'bytecode',
'pixKey' => '[email protected]',
'bankAccountNumber' => '<string>',
'bankRoutingNumber' => '<string>',
'bankBeneficiaryName' => '<string>',
'bankName' => '<string>',
'beneficiaryStreetLine1' => '<string>',
'beneficiaryStreetLine2' => '<string>',
'beneficiaryCity' => '<string>',
'beneficiaryState' => '<string>',
'beneficiaryPostalCode' => '<string>',
'beneficiaryCountry' => '<string>',
'alias' => '<string>',
'description' => '<string>',
'usdPaymentMethod' => 'WIRE',
'rawQuote' => '<unknown>',
'thirdParty' => false,
'webhookURL' => 'https://example.com/webhooks/swap-action'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pods.finance/v2/swap/bytecode"
payload := strings.NewReader("{\n \"quoteId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"accountId\": \"12\",\n \"originAddress\": \"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj\",\n \"destinationAddress\": \"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj\",\n \"output\": \"bytecode\",\n \"pixKey\": \"[email protected]\",\n \"bankAccountNumber\": \"<string>\",\n \"bankRoutingNumber\": \"<string>\",\n \"bankBeneficiaryName\": \"<string>\",\n \"bankName\": \"<string>\",\n \"beneficiaryStreetLine1\": \"<string>\",\n \"beneficiaryStreetLine2\": \"<string>\",\n \"beneficiaryCity\": \"<string>\",\n \"beneficiaryState\": \"<string>\",\n \"beneficiaryPostalCode\": \"<string>\",\n \"beneficiaryCountry\": \"<string>\",\n \"alias\": \"<string>\",\n \"description\": \"<string>\",\n \"usdPaymentMethod\": \"WIRE\",\n \"rawQuote\": \"<unknown>\",\n \"thirdParty\": false,\n \"webhookURL\": \"https://example.com/webhooks/swap-action\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pods.finance/v2/swap/bytecode")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quoteId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"accountId\": \"12\",\n \"originAddress\": \"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj\",\n \"destinationAddress\": \"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj\",\n \"output\": \"bytecode\",\n \"pixKey\": \"[email protected]\",\n \"bankAccountNumber\": \"<string>\",\n \"bankRoutingNumber\": \"<string>\",\n \"bankBeneficiaryName\": \"<string>\",\n \"bankName\": \"<string>\",\n \"beneficiaryStreetLine1\": \"<string>\",\n \"beneficiaryStreetLine2\": \"<string>\",\n \"beneficiaryCity\": \"<string>\",\n \"beneficiaryState\": \"<string>\",\n \"beneficiaryPostalCode\": \"<string>\",\n \"beneficiaryCountry\": \"<string>\",\n \"alias\": \"<string>\",\n \"description\": \"<string>\",\n \"usdPaymentMethod\": \"WIRE\",\n \"rawQuote\": \"<unknown>\",\n \"thirdParty\": false,\n \"webhookURL\": \"https://example.com/webhooks/swap-action\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pods.finance/v2/swap/bytecode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quoteId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"accountId\": \"12\",\n \"originAddress\": \"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj\",\n \"destinationAddress\": \"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj\",\n \"output\": \"bytecode\",\n \"pixKey\": \"[email protected]\",\n \"bankAccountNumber\": \"<string>\",\n \"bankRoutingNumber\": \"<string>\",\n \"bankBeneficiaryName\": \"<string>\",\n \"bankName\": \"<string>\",\n \"beneficiaryStreetLine1\": \"<string>\",\n \"beneficiaryStreetLine2\": \"<string>\",\n \"beneficiaryCity\": \"<string>\",\n \"beneficiaryState\": \"<string>\",\n \"beneficiaryPostalCode\": \"<string>\",\n \"beneficiaryCountry\": \"<string>\",\n \"alias\": \"<string>\",\n \"description\": \"<string>\",\n \"usdPaymentMethod\": \"WIRE\",\n \"rawQuote\": \"<unknown>\",\n \"thirdParty\": false,\n \"webhookURL\": \"https://example.com/webhooks/swap-action\"\n}"
response = http.request(request)
puts response.read_body{
"id": "65f1a2b3c4d5e6f789012345",
"chainId": 1,
"transactionData": [
{
"chainId": "137",
"to": "0xb794F5eA0ba39494cE839613fffBA74279579268",
"data": "0x...",
"value": "0",
"from": "0xb794F5eA0ba39494cE839613fffBA74279579268"
}
],
"instructions": [
null
],
"lutsByAddress": "<unknown>"
}{
"error": {
"code": "QUOTE_NOT_FOUND",
"message": "Quote not found or expired"
}
}{
"error": {
"code": "QUOTE_NOT_FOUND",
"message": "Quote not found or expired"
}
}{
"error": {
"code": "QUOTE_NOT_FOUND",
"message": "Quote not found or expired"
}
}Authorizations
API key for authentication. Obtain from your Pods dashboard.
Body
Quote ID from /v2/swap/quote
"550e8400-e29b-41d4-a716-446655440000"
Fireblocks vault account ID. Required when output=fireblocks.
"12"
Address executing the swap on the origin chain (checksummed EVM or Solana public key)
"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj"
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.
"EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj"
Response format. Fireblocks output requires accountId. instructions is Solana-origin only.
bytecode, userOperation, fireblocks, instructions PIX key for BRL fiat off-ramp routes. Use instead of destinationAddress.
USD bank account number for USDC→USD offramp.
USD ABA routing number for USDC→USD offramp.
Legal name on the USD bank account. ASCII only — Avenia rejects accents.
Bank name for the USD beneficiary.
Beneficiary street address line 1.
Beneficiary street address line 2 (optional).
Beneficiary city.
Beneficiary state / province.
Beneficiary postal code.
Beneficiary country.
USD beneficiary alias (defaults to bankBeneficiaryName).
Optional Avenia beneficiary description.
USD payment rail. Must match the quote when present.
ACH, WIRE "WIRE"
Provider-specific raw quote data from the quote response. Pass this when the quote includes it.
Set to true for third-party PIX payouts. It must match the value used for the quote.
Optional per-quote webhook endpoint override. When set, it updates the quote webhookURL and is copied to the created action.
"https://example.com/webhooks/swap-action"
Response
Bytecode generated successfully
ID created for execution tracking
"65f1a2b3c4d5e6f789012345"
1
Transaction data for execution
- object[]
- object
Show child attributes
Show child attributes
Solana instructions when output=instructions (Solana-origin only)
Solana lookup tables keyed by address when output=instructions
Was this page helpful?