Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.xentfi.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

What’s Possible?

🔄 Cross-chain Transfers

Move assets between different blockchains (Ethereum → Base, Polygon → Arbitrum, etc.)

💱 Token Swaps

Exchange one token for another on the same blockchain (ETH → USDC on Ethereum)

⚡ Instant Quotes

Get real-time quotes before executing any transfer or swap

💰 Competitive Rates

Access to top DEX aggregators and bridge protocols for best pricing

🛡️ Slippage Protection

Set maximum slippage tolerance to protect against price movement

📊 Transaction History

Complete audit trail of all transfers and swaps

Transfer Types

Cross-chain Transfer

Move assets from one blockchain to another using bridge protocols: Supported bridges:
  • Across Protocol
  • LayerZero
  • Wormhole
  • Stargate

Same-chain Swap

Exchange tokens on the same blockchain: Supported DEXs:
  • Uniswap V3
  • Curve
  • Balancer
  • SushiSwap

Use Cases

Treasury Management

ScenarioSolutionBenefit
Consolidate fundsCross-chain transfer to main treasurySingle wallet management
Stablecoin conversionSwap volatile tokens to USDC/USDTReduce volatility
Gas managementTransfer ETH to active chainsPay for transactions
Yield optimizationSwap to highest-yield assetsMaximize returns

Merchant Operations

ScenarioSolutionBenefit
Multi-chain paymentsTransfer from customer chain to main chainUnified treasury
Fee collectionSwap to preferred settlement tokenSimplify accounting
Liquidity managementTransfer between operational walletsOptimize cash flow
Refund processingSwap to original payment tokenAccurate refunds

DeFi Integration

Getting a Quote

Before executing any transfer or swap, get a quote to see expected rates and fees:
curl -X POST https://api.xentfi.com/v1/transfers/quote \
  -H "apiKey: your-api-key" \
  -H "orgId: your-org-id" \
  -H "Content-Type: application/json" \
  -d '{
    "fromAsset": "ETH",
    "toAsset": "USDC",
    "amount": "1",
    "fromBlockchain": "eth-mainnet",
    "toBlockchain": "eth-mainnet"
  }'
{
    "data": {
        "quoteId": "quote_123e4567",
        "fromAsset": "ETH",
        "toAsset": "USDC",
        "fromAmount": "1",
        "toAmount": "3450.50",
        "exchangeRate": "3450.50",
        "estimatedGas": "0.002",
        "totalFees": "0.003",
        "slippageTolerance": "0.5",
        "expiresAt": "2024-01-15T10:45:00.000Z"
    }
}

Cross-chain Transfer Flow

Token Swap Flow

Quote Parameters

Request Parameters

ParameterDescriptionExample
fromAssetSource token symbolETH, USDC
toAssetDestination token symbolUSDC, DAI
amountAmount to transfer/swap”1.5”
fromBlockchainSource blockchaineth-mainnet
toBlockchainDestination blockchainbase-mainnet
slippageToleranceMax price slippage (%)“0.5”
recipientAddressCustom destination (optional)0xRecipient…

Quote Response

FieldDescription
quoteIdUnique identifier for the quote
toAmountExpected output amount
exchangeRateConversion rate
estimatedGasEstimated gas cost
totalFeesTotal fees (gas + protocol)
slippageToleranceYour slippage setting
expiresAtQuote expiration time

Executing Transfers

Same-chain Swap

curl -X POST https://api.xentfi.com/v1/transfers/execute \
  -H "apiKey: your-apiKey" \
  -H "orgId: your-org-id" \
  -H "Content-Type: application/json" \
  -d '{
    "quoteId": "quote_123e4567",
    "walletId": "your-wallet-id"
  }'

Cross-chain Transfer

{
    "quoteId": "quote_123e4567",
    "walletId": "your-wallet-id",
    "recipientAddress": "0xDestinationOnOtherChain"
}

Supported Routes

Same-chain Swaps

FromToChainsTypical Fee
ETHUSDCEthereum, Base, Polygon0.05-0.3%
USDCETHEthereum, Base, Polygon0.05-0.3%
ETHDAIEthereum0.05-0.3%
USDCUSDTAll chains0.01-0.1%

Cross-chain Transfers

From ChainTo ChainBridgeEstimated Time
EthereumBaseAcross2-5 minutes
EthereumPolygonAcross5-10 minutes
PolygonArbitrumAcross5-10 minutes
ArbitrumOptimismAcross5-10 minutes
BaseEthereumAcross2-5 minutes

Slippage Protection

Slippage occurs when prices change between quote and execution:

Slippage Settings

SettingRiskBest for
0.1%Low slippage, higher failure riskStable pairs (USDC/USDT)
0.5%Balanced (recommended)Most trades
1.0%Higher slippage, lower failureVolatile pairs (ETH/USDC)
3.0%High slippageFast execution needed

Gas Optimization

Gas Strategies

StrategyDescriptionSavings
StandardNormal executionBaseline
BatchCombine multiple operationsUp to 50%
Off-peakExecute during low traffic30-60%
L2 firstTransfer to L2, then swap80-90%

Gas Estimates by Network

NetworkAverage Gas CostBest for
Base$0.01-0.05Small trades, frequent operations
Polygon$0.01-0.10General purpose
Arbitrum$0.10-0.50Medium trades
Optimism$0.10-0.50Medium trades
Ethereum$5-50Large trades only

Best Practices

  • Always get a quote first - Never execute blind
  • Set appropriate slippage - Balance success rate vs price protection
  • Monitor gas prices - Execute during low-traffic periods
  • Use L2s when possible - Base and Polygon offer much lower fees
  • Keep records - Save transaction hashes for audit
  • Test with small amounts - Verify routes before large transfers

Webhook Events

EventTriggerPayload contains
transfer.quotedQuote generatedQuote details
transfer.startedExecution initiatedTransaction hash
transfer.confirmedTransaction confirmedFull details
transfer.failedExecution failedError reason
transfer.completedCross-chain completeFinal confirmation

Troubleshooting

Solution: Quotes expire after 15 minutes. Request a new quote and execute promptly.
Solution:
  • Increase slippage tolerance
  • Execute during less volatile periods
  • Use stable pairs when possible
Possible causes:
  • Network congestion
  • Bridge queue
  • Destination chain finality
Solution: Wait for completion; most transfers complete within 10 minutes.
Solution: Ensure you have native tokens (ETH, MATIC, etc.) for gas fees on source chain.

Pricing

FeatureStarterProfessionalBusinessEnterprise
Same-chain swaps
Cross-chain transfers
Quote requests100/day1,000/day10,000/dayUnlimited
Batch execution
Custom routes

Performance Metrics

MetricTargetDescription
Quote time< 500msTime to get a quote
Swap execution< 30 secondsTime to complete swap
Cross-chain transfer< 10 minutesBridge completion time
Success rate> 99%Transfer success rate

Master Wallets

Source and destination wallets

Auto Settlement

Automated transfer rules

Webhooks

Transfer notifications

Next Steps