Body
Route simulation details including hop sequence and input amount
Defines the request for simulating a swap across a defined route of liquidity pools.
An ordered sequence of pools and assets that defines the swap route. Must contain at least 2 hops and no more than 4 hops.
[
{
"assetInAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000",
"assetOutAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111",
"poolId": "03pool1aabbccddeeff00112233445566778899aabbccddeeff00112233445566778"
},
{
"assetInAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111",
"assetOutAddress": "03usdstablecoinpubkey2222222222222222222222222222222222222222222222",
"poolId": "03pool2bbccddeeffffaabbccddeeff00112233445566778899aabbccddeeff0011"
}
]
The total amount of the input asset to be swapped, in its smallest unit.
x >= 0
100000000
The maximum acceptable slippage for the entire route, in basis points (0-10000).
x >= 0
100
Response
Route simulation successful
Represents the complete simulation result for the requested route swap.
The estimated final amount of the output asset to be received, in its smallest unit.
x >= 0
The estimated effective price of the swap, calculated as output_amount
/ input_amount
.
The total estimated fees paid to liquidity providers across all hops.
x >= 0
The total estimated fees paid to pool hosts across all hops.
x >= 0
The total estimated price impact for the entire route as a percentage string.
A detailed breakdown of the simulation results for each hop in the route.
An optional warning message, e.g., if the calculated slippage exceeds the user's maximum setting.