Simulating a Swap
Always simulate a swap before executing to check the expected output and slippage:Executing a Swap
After simulating, execute the swap with slippage protection:Advanced Swap Examples
Note on integrator fees:- If you set
integratorFeeRateBps
up to 30 BPS, none of the integrator fee is shared with Flashnet - If you set
integratorFeeRateBps
above 30 BPS, 30% of the integrator fee is shared with Flashnet
All host and integrator fees are assessed and distributed in Asset B only. Displayed
amountOut
values from the API are post‑fee.Token-to-Token Swap
Bitcoin-to-Token Swap
Swap with Price Checks
Error Handling
Next Steps
- Add liquidity to earn fees from swaps
- Remove liquidity to withdraw your funds
- Monitor swap analytics and pool performance