This endpoint allows users to preview the results of a multi-hop swap through a sequence of liquidity pools without executing the transaction. It calculates expected outputs, fees, and price impacts across the entire route.
The simulation executes virtually through each pool:
Before simulation, the system validates:
The simulation provides detailed impact metrics:
Simulation calculates all fees separately:
The execution price represents:
Route simulation is useful for:
Simulations are read-only operations that don’t modify pool state or require authentication. Anyone can simulate routes.
hops
- Ordered sequence of pools and assets defining the routeamount_in
- Initial amount to swap through the routemax_route_slippage_bps
- Maximum acceptable slippage in basis points200 OK
with detailed simulation results and per-hop breakdown400 Bad Request
if route validation fails or pools don’t exist500 Internal Server Error
if simulation calculation failsRoute simulation details including hop sequence and input amount
Defines the request for simulating a swap across a defined route of liquidity pools.
Route simulation successful
Represents the complete simulation result for the requested route swap.