avnu aggregates every liquidity source on Starknet (AMMs, CLOBs, and market makers) and uses competing solver algorithms to find the best execution path for your trade. Each solver tackles a complex optimization problem: splitting trades across hundreds of potential routes while balancing price impact, gas costs, slippage dynamics, and transaction success probability. We run multiple strategies in parallel, benchmark against direct market maker quotes, and select the solution that maximizes your net output.Documentation Index
Fetch the complete documentation index at: https://docs.avnu.fi/llms.txt
Use this file to discover all available pages before exploring further.
Complete Tutorial
Build a working swap implementation in 5 minutes →
SDK Methods
Data Fetching
getQuotes(request)- Fetch optimized swap quotes
Simple Integration
executeSwap(params)- Complete swap with automatic approvals
Advanced Integration
quoteToCalls(quote, slippage, takerAddress)- Build swap calls for custom execution
How Solvers Work
Finding the optimal trade route on Starknet is a complex challenge. With tens of thousands of liquidity pools, varying gas costs, and fragmented liquidity across AMMs, CLOBs, and market makers, identifying the absolute best price is a non-trivial mathematical problem.The Complexity Problem
The Complexity Problem
For every trade, the solver must navigate a vast search space:
- Fragmented Liquidity: Liquidity is split across multiple protocols and pools.
- Gas vs. Price: A better price might cost more in gas. The solver must calculate the net benefit.
- Multi-Hop Routing: Direct swaps aren’t always best. Sometimes routing through 2 or 3 intermediate tokens yields a higher output.
- Real-Time Constraints: Market conditions change in milliseconds.
Why Trust avnu?
Why Trust avnu?
We have spent years building and refining our solver infrastructure to handle this complexity for you.
- Comprehensive Aggregation: We integrate every significant liquidity source on Starknet.
- Advanced Optimization: Our solvers run competing strategies in parallel to find the global maximum for your trade.
- Battle-Tested: We power a significant portion of Starknet’s trading volume, ensuring reliability and execution quality.
- Zero Maintenance: You get best-in-class execution without maintaining your own indexers or routing logic.
Smart Routing Example
Smart Routing Example
Trade: 10 ETH → USDCNaive approach (single pool):
- Output: 32,450 USDC
- Price impact: 0.8%
- Splits trade across multiple pools (e.g., 60% Pool A, 40% Pool B)
- Uses multi-hop routes when beneficial
- Output: 32,612 USDC
- Price impact: 0.3%
SDK Integration
Understanding Quote Response
buyAmount: Maximum output after solver optimizationpriceImpact: Price impact in basis points (20 = 0.2%), divide by 100 for percentagegasFeesInUsd: Total gas cost including all hopsroutes: How the solver split your trade
Advanced Features
Integrator Fees
Earn revenue on every swap through your integration
API Reference
REST API Documentation
Complete HTTP endpoint reference, authentication, and request/response formats