Create swap calldata

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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

⚠️ Warning

Do not edit calldata returned by this endpoint. Doing so and submitting on chain will likely result in loss of funds. Integrators will be responsible for loss of funds due to edited calldata.


Body Params
quote
required
string

The signed permit.

boolean
Defaults to false
deprecated

Use refreshGasPrice instead.

boolean
Defaults to false

If true, the gas price will be re-fetched from the network.

boolean
Defaults to false

If true, the transaction will be simulated. If the simulation results on an onchain error, endpoint will return an error.

permitData
object

the permit2 message object for the customer to sign to permit spending by the permit2 contract.

string
enum

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.

Allowed:
number

The unix timestamp at which the order will be reverted if not filled.

string
enum
Defaults to urgent

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.

Allowed:
Headers
string
enum
Defaults to 2.0

The version of the Universal Router to use for the swap journey. MUST be consistent throughout the API calls.

Allowed:
Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json