Body
Swap simulation parameters including pool, assets, and amount
Request body for simulating a swap without executing it.
Simulation allows users to preview swap outcomes including expected output, price impact, and fees before committing to the transaction.
LP public key of the pool to simulate the swap through. The pool must exist and be active.
"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"
Address of the asset the user would provide. Must be one of the two assets in the selected pool.
"03bitcoinassetpubkey0000000000000000000000000000000000000000000000"
Address of the asset the user wants to receive. Must be the other asset in the selected pool.
"03usdstablecoinpubkey111111111111111111111111111111111111111111111"
Amount of input asset to simulate swapping, in its smallest unit. Must be positive. Larger amounts will show greater price impact.
x >= 0
100000000
Optional integrator fee rate in basis points applied on the input amount. 25 bps = 0.25%
x >= 0
25
Response
Simulation completed successfully
Response from swap simulation with expected outcomes.
Expected amount of output asset the user would receive, in its smallest unit. This is after all fees are deducted.
x >= 0
4950000
Effective execution price of the swap. Shows how many units of output asset per unit of input asset.
"0.00004950"
Total fee paid denominated in the input asset only. For B->A swaps, this includes LP, host, and integrator fees (all charged in B). For A->B swaps, host and integrator fees are charged in the output asset (B) and are therefore not included here; only the LP fee (in A) is reported.
x >= 0
50000
Price impact of the swap as a percentage. Higher values indicate more slippage from the ideal price.
"0.51%"
Warning message if the simulation detects potential issues. Common warnings include high slippage or low liquidity.
"High price impact detected"