Endpoint
Request Body Parameters
The route object returned from the
/base/route
endpoint.
This contains all necessary information about the swap path and expected outcomes.Maximum acceptable slippage in percentage (0.1 to 100).
Example:
0.5
for 0.5% slippage toleranceUnix timestamp (in seconds) after which the transaction will revert.
Defaults to 20 minutes from the current time if not specified.
Response
The executed route details.
Swap parameters for every hop in the route.
Error Responses
Route Expired
Slippage Exceeded
Insufficient Balance
Invalid Deadline
Best Practices
-
Route Freshness
- Always use a fresh route from the
/base/route
endpoint - Routes can become stale due to market movements
- Implement retry logic with fresh routes if execution fails
- Always use a fresh route from the
-
Slippage Management
- Set appropriate slippage tolerance based on:
- Token pair volatility
- Trade size
- Market conditions
- Higher values increase success rate but may result in worse prices
- Lower values ensure better prices but may cause more failed transactions
- Set appropriate slippage tolerance based on:
-
Deadline Setting
- Set reasonable deadlines to prevent stale transactions
- Consider network congestion when setting deadlines
- Default of 20 minutes is suitable for most cases
-
Gas Optimization
- Monitor
gasUsed
in responses to optimize future transactions - Consider using direct routes for major pairs
- Bundle multiple swaps if possible
- Monitor
See Also
- Route Endpoint - Find the optimal route for your swap
- Calldata Endpoint - Get raw transaction data
- Gas Estimation - Understanding gas costs