Request quotes
Returns one or more quotes for cross-chain transfers, each with fee breakdowns, estimated duration, and execution steps.
POST/quotes
Request quotes for a cross-chain transfer. Returns one or more quotes with fees, estimated duration, and transaction steps to execute.
| Header Parameters | Value |
|---|---|
x-api-key string required Your API key |
| Body Parameters | Value |
|---|---|
srcChainKey string required Source chain key (for example, 'base', 'arbitrum') | |
dstChainKey string required Destination chain key | |
srcTokenAddress string required Source token address (use 0xEeee...EEeE for native ETH) | |
dstTokenAddress string required Destination token address | |
srcWalletAddress string required Sender wallet address | |
dstWalletAddress string required Recipient wallet address | |
amount string required Transfer amount in smallest units (wei for ETH) |
Response
{"quotes": [{"id": "quote_abc123","feeUsd": "0.50","feePercent": "0.5","srcAmount": "100000000000000000","dstAmount": "99500000000000000","routeSteps": [{"type": "STARGATE_V2_TAXI","srcChainKey": "base"}],"userSteps": [{"type": "TRANSACTION","chainKey": "base","chainType": "EVM"}]}],"tokens": []}
Reference
Authentication
Required. Include your API key in the x-api-key header.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | Amount in smallest units (wei for ETH, lamports for SOL) |
srcChainKey | string | Yes | Source chain identifier (for example, base, ethereum) |
srcTokenAddress | string | Yes | Source token contract address |
srcWalletAddress | string | Yes | Sender wallet address |
dstChainKey | string | Yes | Destination chain identifier |
dstTokenAddress | string | Yes | Destination token contract address |
dstWalletAddress | string | Yes | Recipient wallet address |
options | object | No | Optional transfer configuration |
options.amountType | enum | No | EXACT_SRC_AMOUNT (default) |
options.feeTolerance | object | No | Maximum acceptable fee variance |
options.feeTolerance.type | string | No | PERCENT |
options.feeTolerance.amount | number | No | Tolerance percentage (0-100). Default: 1 |
options.dstNativeDropAmount | string | No | Native gas drop on destination. Default: 0 |
Response
Returns a quotes array, rejectedQuotes array, and tokens array.
Quote attributes
| Attribute | Type | Description |
|---|---|---|
id | string | Unique quote identifier (becomes transfer ID after execution) |
routeSteps | array | Array of route segments with protocol types |
fees | array | Detailed fee breakdown by chain and type |
duration | object | Estimated transfer duration |
duration.estimated | string or null | Duration in milliseconds (null if unknown) |
feeUsd | string | Total fees in USD |
feePercent | string | Fee as percentage of transfer amount |
srcAmount | string | Exact amount leaving source chain |
dstAmount | string | Expected amount on destination chain |
dstAmountMin | string | Minimum guaranteed amount (with slippage protection) |
srcAmountUsd | string | Source amount in USD |
dstAmountUsd | string | Destination amount in USD |
userSteps | array | Actions to execute (transactions or signatures) |
options | object | Transfer options |
options.dstNativeDropAmount | string | Native gas drop configuration |
expiresAt | string | Quote expiration timestamp |
Route step attributes
| Attribute | Type | Description |
|---|---|---|
type | enum | Route protocol (see Route types) |
srcChainKey | string | Chain where this step executes |
description | string | Human-readable step description |
duration | object | Estimated step duration |
duration.estimated | string or null | Duration in milliseconds |
fees | array | Fees for this specific step |
Fee attributes
| Attribute | Type | Description |
|---|---|---|
chainKey | string | Chain where fee is paid |
type | enum | MESSAGE, GENERAL, DST_NATIVE_DROP, CCTP_RECEIVE |
description | string | Human-readable fee description |
amount | string | Fee amount in token units |
address | string | Token address for fee |
User step types
User steps can be TRANSACTION or SIGNATURE:
TRANSACTION step:
{
type: "TRANSACTION",
description: string,
chainKey: string,
chainType: "EVM" | "SOLANA" | "APTOS" | "TON" | "TRON",
signerAddress: string,
transaction: {
encoded: {
to: string,
data: string,
value: string,
chainId: number,
from?: string,
gasLimit?: string
}
}
}
SIGNATURE step (EIP-712 for Aori routes):
{
type: "SIGNATURE",
description: string,
chainKey: string,
signerAddress: string,
signature: {
type: "EIP712",
typedData: {
domain: object,
types: object,
message: object
}
}
}
Route types
The API evaluates multiple protocols and returns the best routes:
| Type | Description |
|---|---|
OFT | OFT Standard transfers |
STARGATE_V2_TAXI | Stargate V2 instant transfers |
STARGATE_V2_BUS | Stargate V2 batched transfers |
CCTP | Circle CCTP for native USDC |
AORI | Intent-based swaps via Aori |
Code examples
EVM transfer
- cURL
- TypeScript
- Python
curl -X POST "https://transfer.layerzero-api.com/v1/quotes" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"srcChainKey": "base",
"dstChainKey": "arbitrum",
"srcTokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"dstTokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"srcWalletAddress": "0x1234567890123456789012345678901234567890",
"dstWalletAddress": "0x1234567890123456789012345678901234567890",
"amount": "1000000",
"options": {
"amountType": "EXACT_SRC_AMOUNT",
"feeTolerance": { "type": "PERCENT", "amount": 2 }
}
}'
const response = await fetch('https://transfer.layerzero-api.com/v1/quotes', {
method: 'POST',
headers: {
'x-api-key': process.env.VT_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
srcChainKey: 'base',
dstChainKey: 'arbitrum',
srcTokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
dstTokenAddress: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831',
srcWalletAddress: '0x1234567890123456789012345678901234567890',
dstWalletAddress: '0x1234567890123456789012345678901234567890',
amount: '1000000',
options: {
amountType: 'EXACT_SRC_AMOUNT',
feeTolerance: {type: 'PERCENT', amount: 2},
},
}),
});
const {quotes} = await response.json();
console.log('Quote ID:', quotes[0].id);
console.log('Fee:', quotes[0].feeUsd, 'USD');
import requests
response = requests.post(
"https://transfer.layerzero-api.com/v1/quotes",
headers={
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"srcChainKey": "base",
"dstChainKey": "arbitrum",
"srcTokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"dstTokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"srcWalletAddress": "0x1234567890123456789012345678901234567890",
"dstWalletAddress": "0x1234567890123456789012345678901234567890",
"amount": "1000000",
"options": {
"amountType": "EXACT_SRC_AMOUNT",
"feeTolerance": {"type": "PERCENT", "amount": 2},
},
},
)
quote = response.json()["quotes"][0]
print(f"Quote ID: {quote['id']}")
print(f"Fee: {quote.get('feeUsd', 'N/A')} USD")
Response
{
"quotes": [
{
"id": "quote_abc123",
"routeSteps": [
{
"type": "STARGATE_V2_TAXI",
"srcChainKey": "base",
"description": "Bridge USDC from Base to Arbitrum",
"duration": {
"estimated": "120000"
},
"fees": [...]
}
],
"fees": [
{
"chainKey": "base",
"type": "MESSAGE",
"description": "LayerZero message fee",
"amount": "50000000000000",
"address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
}
],
"duration": {
"estimated": "120000"
},
"feeUsd": "0.15",
"feePercent": "0.15",
"srcAmount": "1000000",
"dstAmount": "998500",
"dstAmountMin": "993515",
"srcAmountUsd": "1.00",
"dstAmountUsd": "0.99",
"userSteps": [
{
"type": "TRANSACTION",
"description": "approve",
"chainKey": "base",
"chainType": "EVM",
"signerAddress": "0x1234567890123456789012345678901234567890",
"transaction": {
"encoded": {
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"data": "0x095ea7b3...",
"value": "0",
"chainId": 8453
}
}
},
{
"type": "TRANSACTION",
"description": "bridge",
"chainKey": "base",
"chainType": "EVM",
"signerAddress": "0x1234567890123456789012345678901234567890",
"transaction": {
"encoded": {
"to": "0x...",
"data": "0x...",
"value": "50000000000000",
"chainId": 8453
}
}
}
],
"options": {
"dstNativeDropAmount": "0"
},
"expiresAt": "2024-01-01T00:30:00.000Z"
}
],
"rejectedQuotes": [],
"tokens": [
{
"chainKey": "base",
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"decimals": 6,
"symbol": "USDC",
"name": "USD Coin"
},
{
"chainKey": "arbitrum",
"address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"decimals": 6,
"symbol": "USDC",
"name": "USD Coin"
}
]
}
Errors
The API returns an error object when the request fails:
{
"error": {
"status": 4000,
"message": "Invalid input",
"issues": [
{
"message": "Invalid source token"
}
]
},
"quotes": []
}
Check the error field before processing quotes:
const result = await response.json();
if (result.error) {
console.error('Quote error:', result.error.message);
result.error.issues?.forEach((issue) => {
console.error(' -', issue.message);
});
return;
}
Quote expiration
Quotes expire after the time specified in expiresAt. Execute quotes promptly or request a new quote if expired.
const quote = quotes[0];
const expiresAt = new Date(quote.expiresAt);
if (new Date() > expiresAt) {
console.log('Quote expired, request a new one');
}
Related endpoints
- Build user steps — Generate fresh transaction data for Solana transfers
- Submit signature — Submit EIP-712 signatures for intent-based routes
- Status — Track transfer progress after execution
Examples
- EVM Example — Complete transfer with viem
- Solana Example — Complete Solana transfer