Create a gasless order
npx skills add uniswap/uniswap-ai --skill swap-integrationFull swap flow integration for apps. Works with Claude Code, Cursor, and other AI coding tools.
Authorization
x-api-keystringrequiredheaderHeaders
x-erc20eth-enabledbooleandefault:falseEnable native ETH input support for UniswapX via ERC20-ETH (EIP-7914). When set to true and tokenIn is the native currency address (e.g. 0x0000000000000000000000000000000000000000), the API may return UniswapX routes that spend native ETH for supported wallets.
x-agent-infostringOptional attribution hint for AI-agent traffic; send it if an AI agent built or operates your integration. The value is a JSON object with up to three fields: decision_origin (required, exactly autonomous or human_mediated, case-sensitive), integration_name (optional string naming your integration, e.g. my-trading-bot), and version (optional string identifying your integration's version). Any other key is dropped, never rejected. The raw value must be at most 1024 bytes of printable US-ASCII (0x20-0x7E), so send non-ASCII text as JSON \u escapes; integration_name and version are each limited to 256 UTF-16 code units and may not contain control characters, U+2028, U+2029, or U+FFFD. Send the header once: repeated header lines are joined with , and the joined string is what gets parsed, so two complete objects fail as invalid JSON while a single object split across two lines still parses. The header is analytics-only and never affects the request: omitting it, sending it, or sending a value that fails these rules never changes the response status, body, or swap behavior. A value that fails to parse is dropped and reported by the x-agent-info-status response header. Never put a user ID, wallet address, email, session token, or API key in these fields.
Body
application/jsonsignaturestringrequiredThe signed permit.
routingenumrequiredThe routing for the proposed transaction.
Response
Encoded order submitted.
requestIdstringrequiredA unique ID for the request.
orderIdstringrequiredA unique ID for the order. Used to track the order's status.
orderStatusenumrequiredThe status of the order. Note that all of these are final states with the exception of Open, meaning that no further state changes will occur.
Open - order is not yet filled by a filler.
Expired - order has expired without being filled and is no longer fillable.
Error - a catchall for other final states which are not otherwise specified, where the order will not be filled.
Cancelled - order is cancelled. Note that to cancel an order, a new order must be placed with the same nonce as the prior open order and it must be placed within the same block as the original order.
Filled - order is filled.
Insufficient-funds - the swapper (you) do not have enough funds for the order to be completed and the order is cancelled and will not be filled.
Unverified - order has not been verified yet.
/ordercurl --request POST \
--url 'https://trade-api.gateway.uniswap.org/v1/order' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-erc20eth-enabled: false'{ "requestId": "<string>", "orderId": "<string>", "orderStatus": "<string>"}