Get live quotes and execute swaps on Aerodrome (Base) and Velodrome (Optimism) without running your own nodes or building complex routing logic.
Build swap UIs with live quotes, slippage protection, and one-click execution.
Real-time token prices for portfolio valuation and performance tracking.
Automated trading with live quotes, gas optimization, and transaction monitoring.
Pool discovery, liquidity analysis, and market data for research platforms.
Skip running Base/Optimism nodes, indexing pools, or building routing algorithms. Just call our API.
Live quotes that update every block. No stale prices or failed swaps due to outdated data.
Built on QuickNode infrastructure. Handles millions of requests with 99.95% uptime.
Each section below contains interactive examples you can run directly in your browser. Start with the endpoint that matches your use case:
Get your API key from the QuickNode marketplace. Takes 30 seconds and includes free usage while in beta.
Get API AccessGet a swap quote for AERO → USDC
// Get swap quote
const response = await fetch(
'https://your-endpoint.../v1/quote?' +
new URLSearchParams({
quotetarget: 'base',
from_token: '0x940181a94A35A4569E4529A3CDfB74e38FD98631',
to_token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
amount: '1',
slippage: '0.005'
})
);
const quote = await response.json();
console.log('Quote:', quote.execution_price);
console.log('Slippage:', quote.slippage);
Find tokens for your swap interface
// Search for tokens
const searchTokens = async (query) => {
const response = await fetch(
`https://your-endpoint.../v1/tokens/search?target=base&query=${query}&limit=10`
);
const data = await response.json();
return data.tokens.map(token => ({
symbol: token.symbol,
address: token.address,
name: token.name
}));
};
// Usage
const tokens = await searchTokens('AERO');
console.log(tokens);
Fetch real-time token prices
// Get token prices
const getPrices = async (symbols) => {
const response = await fetch(
`https://your-endpoint.../v1/prices?target=aero&symbols=${symbols.join(',')}&limit=50`
);
const data = await response.json();
// Extract prices
const prices = {};
Object.entries(data.prices).forEach(([address, info]) => {
prices[info.token.symbol] = info.price;
});
return prices;
};
// Usage
const prices = await getPrices(['AERO', 'USDC', 'WETH']);
console.log('AERO Price:', prices.AERO);
Create transaction for wallet signing
// Build swap transaction
const buildSwap = async (fromToken, toToken, amount, walletAddress) => {
const response = await fetch(
'https://your-endpoint.../v1/swap/build?target=base',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
from_token: fromToken,
to_token: toToken,
amount: amount,
wallet_address: walletAddress,
slippage: 0.005
})
}
);
const transaction = await response.json();
return transaction;
};
// Usage
const tx = await buildSwap(
'0x940181a94A35A4569E4529A3CDfB74e38FD98631', // AERO
'0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // USDC
1.0,
'0xYourWalletAddress'
);