Side-by-side comparison of 7 DeFi trading and DEX aggregator APIs. Supported chains, swap routing, rate limits, MEV protection, and working code examples for developers.
Last updated: March 6, 2026. Features and limits verified against official documentation.
DEX aggregator APIs find the best swap route across multiple decentralized exchanges, splitting orders for optimal pricing.
What developers build with DeFi trading APIs.
Automated arbitrage, market making, and DCA bots that execute swaps programmatically across DEXes.
Display real-time token prices, balances, and portfolio performance with live price feeds.
Embed swap functionality directly into dApps, wallets, or websites with pre-built or custom UIs.
Aggregate protocol data, TVL, yields, and pricing across chains for analytics platforms.
Give AI agents the ability to check prices, execute swaps, and manage portfolios autonomously.
Route swaps through private order flow or batch auctions to prevent sandwich attacks and front-running.
The numbers that matter when choosing a DeFi trading API.
| Provider | Free Tier | Chains | Swap Quotes | Swap Execution | MEV Protection | API Key |
|---|---|---|---|---|---|---|
| 1inch | Free + Paid | 12+ EVM | ✓ | ✓ | Fusion | Required |
| 0x / Matcha | Free + Paid | 9 EVM | ✓ | ✓ | Gasless | Required |
| Jupiter | Free | Solana only | ✓ | ✓ | ✗ | Optional |
| Uniswap | Free + Paid | 8 EVM | ✓ | Smart Routing | UniswapX | Required |
| Odos | Free | 15+ EVM | ✓ | ✓ | ✗ | Not required |
| OpenOcean | Free | 40+ chains | ✓ | ✓ | ✗ | Not required |
| Frostbyte This API | 200 Free Credits | 527+ tokens | Price Feed | Via Wallet API | N/A | Not required |
Which chains each API supports for token swaps.
| Chain | 1inch | 0x | Jupiter | Uniswap | Odos | OpenOcean |
|---|---|---|---|---|---|---|
| Ethereum | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ |
| Arbitrum | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ |
| Base | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ |
| Polygon | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ |
| Optimism | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ |
| BSC | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ |
| Avalanche | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ |
| Solana | ✗ | ✗ | ✓ | ✗ | ✗ | ✓ |
| Fantom | ✓ | ✓ | ✗ | ✗ | ✓ | ✓ |
| zkSync Era | ✓ | ✗ | ✗ | ✓ | ✓ | ✓ |
What each DeFi trading API actually gives you, with honest pros and cons.
Most comprehensive DeFi API suite
Production-grade DEX aggregation
Solana's dominant DEX aggregator
The original DEX, now with routing API
Smart order routing with multi-input swaps
Widest multi-chain coverage (40+ chains)
Simplest crypto price feed + wallet API
Different tools for different needs. Choose the right type of API for your use case.
| Feature | DEX Aggregator | Direct DEX API | Price Feed API |
|---|---|---|---|
| Examples | 1inch, 0x, Jupiter, Odos | Uniswap SDK, Raydium | Frostbyte, CoinGecko |
| Best price? | Yes (multi-source) | Single source only | Display price only |
| Swap execution | Full transaction building | Direct contract calls | No execution |
| Complexity | Medium (REST API) | High (SDK + ABI) | Low (simple GET) |
| Use case | Trading bots, swap widgets | Custom DEX, LP management | Dashboards, alerts, display |
| Gas optimization | Route splitting | Manual | N/A |
| Setup time | ~30 minutes | ~2-4 hours | ~5 minutes |
MEV (Maximal Extractable Value) causes traders to lose money via sandwich attacks and front-running. Here's how different APIs protect you.
Working examples for the most common DeFi API operations.
Get a swap quote from different DEX aggregators.
// 1inch — Get swap quote (Ethereum)
const res = await fetch(
'https://api.1inch.dev/swap/v6.0/1/quote' +
'?src=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' + // USDC
'&dst=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2' + // WETH
'&amount=1000000000', // 1000 USDC (6 decimals)
{
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Accept': 'application/json'
}
}
);
const quote = await res.json();
console.log('Estimated output:', quote.dstAmount);
console.log('Gas estimate:', quote.gas);
// 0x API — Get swap price (Ethereum)
const res = await fetch(
'https://api.0x.org/swap/v1/price' +
'?sellToken=USDC' +
'&buyToken=WETH' +
'&sellAmount=1000000000', // 1000 USDC
{
headers: {
'0x-api-key': 'YOUR_0X_API_KEY'
}
}
);
const price = await res.json();
console.log('Buy amount:', price.buyAmount);
console.log('Price:', price.price);
console.log('Sources:', price.sources);
// Jupiter — Get swap quote (Solana)
const res = await fetch(
'https://quote-api.jup.ag/v6/quote' +
'?inputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' + // USDC
'&outputMint=So11111111111111111111111111111111111111112' + // SOL
'&amount=1000000000' + // 1000 USDC (6 decimals)
'&slippageBps=50' // 0.5% slippage
);
const quote = await res.json();
console.log('Output amount:', quote.outAmount);
console.log('Route plan:', quote.routePlan);
console.log('Price impact:', quote.priceImpactPct);
// Odos — Get swap quote (any EVM chain)
const res = await fetch('https://api.odos.xyz/sor/quote/v2', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
chainId: 1, // Ethereum
inputTokens: [{
tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amount: '1000000000' // 1000 USDC
}],
outputTokens: [{
tokenAddress: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
proportion: 1
}],
userAddr: '0xYourWalletAddress'
})
});
const quote = await res.json();
console.log('Output:', quote.outAmounts);
console.log('Gas estimate:', quote.gasEstimate);
Simple price lookups for dashboards and alerts.
// Frostbyte — Get all crypto prices (no API key needed)
const res = await fetch(
'https://agent-gateway-kappa.vercel.app/v1/defi-trading/prices'
);
const data = await res.json();
console.log(`${data.count} tokens available`);
console.log('BTC:', '$' + data.prices.BTC);
console.log('ETH:', '$' + data.prices.ETH);
console.log('SOL:', '$' + data.prices.SOL);
// Single token price
const btc = await fetch(
'https://agent-gateway-kappa.vercel.app/v1/defi-trading/price/BTC'
);
const price = await btc.json();
console.log('BTC price:', price);
// 1inch — Get spot prices for tokens
const res = await fetch(
'https://api.1inch.dev/price/v1.1/1', // chainId 1 = Ethereum
{
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
tokens: [
'0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' // USDC
],
currency: 'USD'
})
}
);
const prices = await res.json();
console.log(prices);
# Frostbyte — No API key, no signup
curl https://agent-gateway-kappa.vercel.app/v1/defi-trading/prices
# Single token
curl https://agent-gateway-kappa.vercel.app/v1/defi-trading/price/ETH
# Jupiter — Solana token price (no API key)
curl "https://price.jup.ag/v6/price?ids=SOL"
# Odos — Token pricing (no API key)
curl "https://api.odos.xyz/pricing/token/1/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
Try the Frostbyte price API right now. No API key needed.
What you'll pay at different usage levels. Most DEX aggregators monetize through swap fees, not API calls.
| Provider | API Cost | Swap Fee | $100K Volume/mo | $1M Volume/mo |
|---|---|---|---|---|
| 1inch | Free tier + enterprise | 0% (free routing) | $0 (gas only) | Custom pricing |
| 0x | Free tier available | 0.15% default | ~$150 | ~$1,500 |
| Jupiter | Free (rate-limited) | 0.2% platform fee | ~$200 | ~$2,000 |
| Uniswap | Routing API (paid) | 0.25% (via interface) | ~$250 | ~$2,500 |
| Odos | Free | 0% (referral optional) | $0 (gas only) | $0 (gas only) |
| OpenOcean | Free | 0% | $0 (gas only) | $0 (gas only) |
| Frostbyte | 200 free credits | 0.3% (wallet swaps) | ~$5 API + $300 swaps | ~$50 API + $3,000 swaps |
Note: Gas fees (paid to the blockchain network) are additional and vary by chain. L2s (Arbitrum, Base, Optimism) have significantly lower gas than Ethereum mainnet.
Pick the right API based on what you're building.
You need fast quotes, reliable execution, and MEV protection to avoid losing money to sandwich attacks.
You need a swap widget or API that works across chains with good UX and documentation.
Jupiter has ~80% of Solana DEX volume. It's the clear choice for any Solana DeFi project.
You just need token prices for display, monitoring, or notifications — no swap execution.
You're building a multi-chain app and need the widest possible network support.
You want to minimize costs and avoid platform fees on top of gas.
GET /v1/defi-trading/prices. Jupiter also provides free token pricing on Solana. For DEX-native prices, you can query on-chain data directly via RPC nodes, but this requires more development effort.Get real-time crypto prices in seconds. No signup, no API key, 527+ tokens.