Create the calldata for a swap transaction (including wrap/unwrap) against the Uniswap Protocols. If the quote parameter includes the fee parameters, then the calldata will include the fee disbursement. The gas estimates will be more precise when the the response calldata would be valid if submitted on-chain.
The version of the Universal Router to use for the swap journey. MUST be consistent throughout the API calls.
1.2, 2.0 Controls whether the Permit2 approval flow is used. When set to false, the endpoint returns quote data without Permit2 permit generation (no permitData, permitTransaction, or permitGasFee), and the header is forwarded to the routing layer for correct gas simulation against the Proxy Universal Router contract. When true or omitted, the standard Permit2 approval flow is used. This header is intended for integrators whose infrastructure uses a direct approval-then-swap pattern without Permit2.
The parameters signature and permitData should only be included if permitData was returned from /quote.
The signed permit.
Use refreshGasPrice instead.
If true, the gas price will be re-fetched from the network.
If true, the transaction will be simulated. If the simulation results on an onchain error, endpoint will return an error.
the permit2 message object for the customer to sign to permit spending by the permit2 contract.
Swap safety mode will automatically sweep the transaction for the native token and return it to the sender wallet address. This is to prevent accidental loss of funds in the event that the token amount is set in the transaction value instead of as part of the calldata.
SAFE The unix timestamp at which the order will be reverted if not filled.
The urgency impacts the estimated gas price of the transaction. The higher the urgency, the higher the gas price, and the faster the transaction is likely to be selected from the mempool. The default value is urgent.
normal, fast, urgent