LLMs.txt: agent-readable Markdown index of this site at /llms.txt
POSTCreate swap EIP 5792 calldata

Create swap EIP 5792 calldata

Create the EIP 5792 calldata for a swap transaction (including wrap/unwrap and bridging) 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 response calldata would be valid if submitted on-chain.

npx skills add uniswap/uniswap-ai --skill swap-integration

Full swap flow integration for apps. Works with Claude Code, Cursor, and other AI coding tools.

Get a QuoteThis endpoint requires a quote response from the Quote API.

Authorization

x-api-keystringrequiredheader
Playground key
You're using a shared playground keyCreate a free account and get your own API keys from the dashboard.
Get your keys

Headers

x-universal-router-versionenumdefault:2.0
1.22.02.1.1

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

Body

application/json
deadlinenumber

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

Response

Create 5792 swap successful.

requestIdstringrequired

A unique ID for the request.

fromstringrequired
chainIdenumrequired

The unique ID of the blockchain. For a list of supported chains see the FAQ.

callsobject[]required
gasFeestring

The total estimated gas cost of this transaction (eg. gasLimit multiplied by maxFeePerGas) in the base unit of the chain.