Using paraswap, a dApp can fetch an indicative price first, then assemble the on-chain swap call when its user is ready to trade.