Core Endpoints
Get Route
Find the optimal trading route across supported networks
GET
Overview
V2 Available: An enhanced version of this endpoint is available at
/{network}/v2/route with integrator support, metadata, and API key features. See Get Route V2 and the V2 Migration Guide.Supported Networks
- Base
- HyperEVM
- Citrea
- Monad
- Starknet
Request Parameters
string
required
The amount of input tokens in wei format (for EVM chains) or the smallest unit for the token.Example:
"1000000000000000000" for 1 token with 18 decimalsstring
required
The contract address of the input token.
- Base/HyperEVM/Citrea/Monad
- Starknet
Use
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE or 0x0000000000000000000000000000000000000000 for native tokensstring
required
The contract address of the output token.
number
default:"0.5"
Maximum acceptable slippage in percentage (0.1 to 100).Example:
0.5 for 0.5% slippage tolerancestring
The destination address to receive the output tokens. If not provided, defaults to the sender address.
string[]
Array of protocol IDs to exclude from routing.
boolean
default:"false"
If true, only direct swaps will be considered (no multi-hop routes).
Response
boolean
Indicates if the route was successfully found
number
Type of swap route (0 = standard)
object
Information about the input token
object
Information about the output token (same structure as inputToken)
string
The amount of input tokens in wei format
string
The expected amount of output tokens in wei format
number
Time taken to calculate the route (in seconds)
string
Estimated gas units for the transaction
number
Estimated gas cost in USD
object[]
Array of route segments showing how the swap is split
boolean
Indicates if this is an initial route calculation
Example Request
Best Practices
- Fresh Routes
- Always fetch a new route before executing a swap
- Routes can become stale due to market movements
- Typical validity: 30-60 seconds depending on market volatility
- Slippage Settings
- Stable pairs: 0.1% - 0.5%
- Volatile pairs: 1% - 3%
- Low liquidity tokens: 3% - 5%
- Gas Optimization
- Use
direct: truefor major token pairs - Consider gas costs vs. price improvement for small amounts
- Exclude high-gas protocols when optimizing for speed
- Use
- Error Handling
- Implement retry logic with exponential backoff
- Check for insufficient liquidity errors
- Validate token addresses before calling
Network-Specific Notes
Base Network
Base Network
- Native token: ETH
- Common tokens: USDC, USDbC, WETH, DAI
- Average block time: ~2 seconds
HyperEVM
HyperEVM
- Native token: HYPE
- Common tokens: USDC, WHYPE
- Average block time: ~2 seconds
Citrea
Citrea
- Native token: cBTC
- Common tokens: wcBTC, USDC.e
- Average block time: TBD
- Bitcoin’s first ZK rollup with EVM compatibility
Starknet
Starknet
- Native token: ETH
- Common tokens: USDC, STRK
- Uses Cairo VM (different address format)
- See Starknet-specific documentation
Related Endpoints
- Execute - Execute the swap using the route
- Calldata - Get transaction calldata
- Health Check - Check API status
- Get Route V2 - Enhanced route endpoint with integrator support
- V2 Migration Guide - Migrate to V2 API